Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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_TEST
Function · 0.85
is_i2p_url
Function · 0.85
tracker_response
Method · 0.85
Calls
4
equal
Function · 0.85
rbegin
Method · 0.80
rend
Method · 0.80
size
Method · 0.45
Tested by
1
TORRENT_TEST
Function · 0.68