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

Function NormalizeUrlName

library/cpp/string_utils/url/url.cpp:417–426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

415}
416
417size_t NormalizeUrlName(char* dest, const TStringBuf source, size_t dest_size) {
418 if (source.empty() || source[0] == '?')
419 return strlcpy(dest, "/", dest_size);
420 size_t len = Min(dest_size - 1, source.length());
421 memcpy(dest, source.data(), len);
422 dest[len] = 0;
423 len -= Unescape(dest);
424 strlwr(dest);
425 return len;
426}
427
428size_t NormalizeHostName(char* dest, const TStringBuf source, size_t dest_size, ui16 defport) {
429 size_t len = Min(dest_size - 1, source.length());

Callers

nothing calls this directly

Calls 7

strlwrFunction · 0.85
UnescapeFunction · 0.70
strlcpyFunction · 0.50
MinFunction · 0.50
emptyMethod · 0.45
lengthMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected