MCPcopy Create free account
hub / github.com/catboost/catboost / CutWWWPrefix

Function CutWWWPrefix

library/cpp/string_utils/url/url.cpp:333–337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

331}
332
333TStringBuf CutWWWPrefix(const TStringBuf url Y_LIFETIME_BOUND) noexcept {
334 if (url.size() >= 4 && url[3] == '.' && !strnicmp(url.data(), "www", 3))
335 return url.substr(4);
336 return url;
337}
338
339TStringBuf CutWWWNumberedPrefix(const TStringBuf url Y_LIFETIME_BOUND) noexcept {
340 auto it = url.begin();

Callers 3

CutHttpWwwPrefixesFunction · 0.85
CutUrlPrefixesFunction · 0.85
Y_UNIT_TESTFunction · 0.85

Calls 3

sizeMethod · 0.45
dataMethod · 0.45
substrMethod · 0.45

Tested by

no test coverage detected