MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / HasPrefix

Function HasPrefix

src/util/string.h:261–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259 */
260template <typename T1, size_t PREFIX_LEN>
261[[nodiscard]] inline bool HasPrefix(const T1& obj,
262 const std::array<uint8_t, PREFIX_LEN>& prefix)
263{
264 return obj.size() >= PREFIX_LEN &&
265 std::equal(std::begin(prefix), std::end(prefix), std::begin(obj));
266}
267
268struct LineReader {
269 const std::span<const std::byte>::iterator start;

Callers 14

UnserializeV2StreamMethod · 0.85
SetLegacyIPv6Method · 0.85
IsRFC3927Method · 0.85
IsRFC5737Method · 0.85
IsRFC3849Method · 0.85
IsRFC3964Method · 0.85
IsRFC6052Method · 0.85
IsRFC4380Method · 0.85
IsRFC4862Method · 0.85
IsRFC6145Method · 0.85
IsRFC4843Method · 0.85
IsRFC7343Method · 0.85

Calls 3

beginFunction · 0.85
endFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected