MCPcopy Create free account
hub / github.com/arvidn/libtorrent / string_ends_with

Function string_ends_with

src/string_util.cpp:127–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125 }
126
127 bool string_ends_with(string_view s1, string_view s2)
128 {
129 return s1.size() >= s2.size() && std::equal(s2.rbegin(), s2.rend(), s1.rbegin());
130 }
131
132 int search(span<char const> src, span<char const> target)
133 {

Callers 3

TORRENT_TESTFunction · 0.85
is_i2p_urlFunction · 0.85
tracker_responseMethod · 0.85

Calls 4

equalFunction · 0.85
rbeginMethod · 0.80
rendMethod · 0.80
sizeMethod · 0.45

Tested by 1

TORRENT_TESTFunction · 0.68