MCPcopy Create free account
hub / github.com/ElementsProject/elements / HasPrefix

Function HasPrefix

src/util/string.h:100–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98 */
99template <typename T1, size_t PREFIX_LEN>
100[[nodiscard]] inline bool HasPrefix(const T1& obj,
101 const std::array<uint8_t, PREFIX_LEN>& prefix)
102{
103 return obj.size() >= PREFIX_LEN &&
104 std::equal(std::begin(prefix), std::end(prefix), std::begin(obj));
105}
106
107#endif // BITCOIN_UTIL_STRING_H

Callers 13

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