diff options
author | manavrion <manavrion@yandex-team.ru> | 2022-02-10 16:49:16 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:16 +0300 |
commit | 29d0b2eeae154d04156e0698067c0c21a97ea61d (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/string_utils/url/url.cpp | |
parent | 109de9f4c31b6caaa736ce29a61fce05851e7c02 (diff) | |
download | ydb-29d0b2eeae154d04156e0698067c0c21a97ea61d.tar.gz |
Restoring authorship annotation for <manavrion@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/string_utils/url/url.cpp')
-rw-r--r-- | library/cpp/string_utils/url/url.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/library/cpp/string_utils/url/url.cpp b/library/cpp/string_utils/url/url.cpp index ffd610d21e..85f4ac5d69 100644 --- a/library/cpp/string_utils/url/url.cpp +++ b/library/cpp/string_utils/url/url.cpp @@ -62,17 +62,17 @@ namespace { } } -namespace NUrl { - - TSplitUrlToHostAndPathResult SplitUrlToHostAndPath(const TStringBuf url) { - TStringBuf host = GetSchemeHostAndPort(url, /*trimHttp=*/false, /*trimDefaultPort=*/false); - TStringBuf path = url; - path.SkipPrefix(host); - return {host, path}; - } - -} // namespace NUrl - +namespace NUrl { + + TSplitUrlToHostAndPathResult SplitUrlToHostAndPath(const TStringBuf url) { + TStringBuf host = GetSchemeHostAndPort(url, /*trimHttp=*/false, /*trimDefaultPort=*/false); + TStringBuf path = url; + path.SkipPrefix(host); + return {host, path}; + } + +} // namespace NUrl + size_t GetHttpPrefixSize(const char* url, bool ignorehttps) noexcept { return GetHttpPrefixSizeImpl<char>(url, TUncheckedSize(), ignorehttps); } @@ -183,13 +183,13 @@ TStringBuf GetSchemeHostAndPort(const TStringBuf url, bool trimHttp, bool trimDe } void SplitUrlToHostAndPath(const TStringBuf url, TStringBuf& host, TStringBuf& path) { - auto [hostBuf, pathBuf] = NUrl::SplitUrlToHostAndPath(url); - host = hostBuf; - path = pathBuf; + auto [hostBuf, pathBuf] = NUrl::SplitUrlToHostAndPath(url); + host = hostBuf; + path = pathBuf; } void SplitUrlToHostAndPath(const TStringBuf url, TString& host, TString& path) { - auto [hostBuf, pathBuf] = NUrl::SplitUrlToHostAndPath(url); + auto [hostBuf, pathBuf] = NUrl::SplitUrlToHostAndPath(url); host = hostBuf; path = pathBuf; } |