Page MenuHomePhabricator

util: move HasPrefix() so it can be reused
ClosedPublic

Authored by Fabien on Feb 9 2021, 12:26.

Details

Reviewers
majcosta
Group Reviewers
Restricted Project
Commits
rABC7af7f8499288: util: move HasPrefix() so it can be reused
Summary
Move the function `HasPrefix()` from `netaddress.cpp` to `util/string.h`
so it can be reused by `CNetAddr` methods (and possibly others).

Partial backport (1/4) of core PR19845:
https://github.com/bitcoin/bitcoin/pull/19845/commits/d2bb681f96fb327b4c4d5b2b113692ca22fdffbf

Test Plan
ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable