aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/string_utils
diff options
context:
space:
mode:
authorIlnur Khuziev <ilnur.khuziev@yandex.ru>2022-02-10 16:46:13 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:13 +0300
commit736dcd8ca259457a136f2f9f9168c44643914323 (patch)
treeddd46a036d68bfa83aa11b892f31243ea6b068a1 /library/cpp/string_utils
parent9bf2fa2b060c9881d3135c2208c624a1dd546ecc (diff)
downloadydb-736dcd8ca259457a136f2f9f9168c44643914323.tar.gz
Restoring authorship annotation for Ilnur Khuziev <ilnur.khuziev@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/string_utils')
-rw-r--r--library/cpp/string_utils/base64/base64.cpp16
-rw-r--r--library/cpp/string_utils/base64/base64.h2
-rw-r--r--library/cpp/string_utils/base64/base64_decode_uneven_ut.cpp4
-rw-r--r--library/cpp/string_utils/base64/base64_ut.cpp2
-rw-r--r--library/cpp/string_utils/base64/bench/main.cpp4
-rw-r--r--library/cpp/string_utils/base64/bench/metrics/main.py2
-rw-r--r--library/cpp/string_utils/base64/bench/metrics/ya.make2
-rw-r--r--library/cpp/string_utils/base64/bench/ya.make2
-rw-r--r--library/cpp/string_utils/base64/fuzz/generic/ya.make2
-rw-r--r--library/cpp/string_utils/base64/fuzz/lib/main.cpp2
-rw-r--r--library/cpp/string_utils/base64/fuzz/lib/ya.make2
-rw-r--r--library/cpp/string_utils/base64/ut/ya.make2
-rw-r--r--library/cpp/string_utils/levenshtein_diff/levenshtein_diff_ut.cpp2
-rw-r--r--library/cpp/string_utils/parse_size/parse_size_ut.cpp2
-rw-r--r--library/cpp/string_utils/parse_size/ut/ya.make2
-rw-r--r--library/cpp/string_utils/quote/quote_ut.cpp2
-rw-r--r--library/cpp/string_utils/quote/ut/ya.make2
-rw-r--r--library/cpp/string_utils/relaxed_escaper/relaxed_escaper_ut.cpp2
-rw-r--r--library/cpp/string_utils/relaxed_escaper/ut/ya.make2
-rw-r--r--library/cpp/string_utils/url/url.cpp38
-rw-r--r--library/cpp/string_utils/url/url.h94
-rw-r--r--library/cpp/string_utils/url/url_ut.cpp2
-rw-r--r--library/cpp/string_utils/url/ut/ya.make2
-rw-r--r--library/cpp/string_utils/ya.make62
24 files changed, 127 insertions, 127 deletions
diff --git a/library/cpp/string_utils/base64/base64.cpp b/library/cpp/string_utils/base64/base64.cpp
index 05c201f0de..8ff70a5b9b 100644
--- a/library/cpp/string_utils/base64/base64.cpp
+++ b/library/cpp/string_utils/base64/base64.cpp
@@ -31,14 +31,14 @@ namespace {
const bool haveNEON64 = false;
#endif
-# ifdef _windows_
- // msvc does something wrong in release-build, so we temprorary disable this branch on windows
- // https://developercommunity.visualstudio.com/content/problem/334085/release-build-has-made-wrong-optimizaion-in-base64.html
- const bool isWin = true;
-# else
- const bool isWin = false;
-# endif
- if (!isWin && NX86::HaveAVX() && NX86::HaveAVX2()) {
+# ifdef _windows_
+ // msvc does something wrong in release-build, so we temprorary disable this branch on windows
+ // https://developercommunity.visualstudio.com/content/problem/334085/release-build-has-made-wrong-optimizaion-in-base64.html
+ const bool isWin = true;
+# else
+ const bool isWin = false;
+# endif
+ if (!isWin && NX86::HaveAVX() && NX86::HaveAVX2()) {
Encode = avx2_base64_encode;
Decode = avx2_base64_decode;
} else if (NX86::HaveSSSE3()) {
diff --git a/library/cpp/string_utils/base64/base64.h b/library/cpp/string_utils/base64/base64.h
index f778a6425a..7c9f0987e7 100644
--- a/library/cpp/string_utils/base64/base64.h
+++ b/library/cpp/string_utils/base64/base64.h
@@ -32,7 +32,7 @@ inline void Base64Decode(const TStringBuf src, TString& dst) {
dst.resize(Base64Decode(src, dst.begin()).size());
}
-//WARNING: can process not whole input silently, use Base64StrictDecode instead of this function
+//WARNING: can process not whole input silently, use Base64StrictDecode instead of this function
inline TString Base64Decode(const TStringBuf s) {
TString ret;
Base64Decode(s, ret);
diff --git a/library/cpp/string_utils/base64/base64_decode_uneven_ut.cpp b/library/cpp/string_utils/base64/base64_decode_uneven_ut.cpp
index c3ed068a37..de2d96c36c 100644
--- a/library/cpp/string_utils/base64/base64_decode_uneven_ut.cpp
+++ b/library/cpp/string_utils/base64/base64_decode_uneven_ut.cpp
@@ -1,6 +1,6 @@
-#include <library/cpp/testing/unittest/registar.h>
+#include <library/cpp/testing/unittest/registar.h>
-#include <library/cpp/string_utils/base64/base64.h>
+#include <library/cpp/string_utils/base64/base64.h>
Y_UNIT_TEST_SUITE(TBase64DecodeUneven) {
Y_UNIT_TEST(Base64DecodeUneven) {
diff --git a/library/cpp/string_utils/base64/base64_ut.cpp b/library/cpp/string_utils/base64/base64_ut.cpp
index bcc1e65879..bc2c7398be 100644
--- a/library/cpp/string_utils/base64/base64_ut.cpp
+++ b/library/cpp/string_utils/base64/base64_ut.cpp
@@ -7,7 +7,7 @@
#include <contrib/libs/base64/plain64/libbase64.h>
#include <contrib/libs/base64/ssse3/libbase64.h>
-#include <library/cpp/testing/unittest/registar.h>
+#include <library/cpp/testing/unittest/registar.h>
#include <util/generic/vector.h>
#include <util/random/fast.h>
diff --git a/library/cpp/string_utils/base64/bench/main.cpp b/library/cpp/string_utils/base64/bench/main.cpp
index 10e09bc1c7..5d0a4c40d9 100644
--- a/library/cpp/string_utils/base64/bench/main.cpp
+++ b/library/cpp/string_utils/base64/bench/main.cpp
@@ -1,6 +1,6 @@
-#include <library/cpp/string_utils/base64/base64.h>
+#include <library/cpp/string_utils/base64/base64.h>
-#include <library/cpp/testing/benchmark/bench.h>
+#include <library/cpp/testing/benchmark/bench.h>
#include <util/generic/buffer.h>
#include <util/generic/singleton.h>
diff --git a/library/cpp/string_utils/base64/bench/metrics/main.py b/library/cpp/string_utils/base64/bench/metrics/main.py
index c35fd6d8cd..272b6bdcfa 100644
--- a/library/cpp/string_utils/base64/bench/metrics/main.py
+++ b/library/cpp/string_utils/base64/bench/metrics/main.py
@@ -2,4 +2,4 @@ import yatest.common as yc
def test_export_metrics(metrics):
- metrics.set_benchmark(yc.execute_benchmark('library/cpp/string_utils/base64/bench/bench'))
+ metrics.set_benchmark(yc.execute_benchmark('library/cpp/string_utils/base64/bench/bench'))
diff --git a/library/cpp/string_utils/base64/bench/metrics/ya.make b/library/cpp/string_utils/base64/bench/metrics/ya.make
index b0406516c3..25f925840a 100644
--- a/library/cpp/string_utils/base64/bench/metrics/ya.make
+++ b/library/cpp/string_utils/base64/bench/metrics/ya.make
@@ -15,6 +15,6 @@ TAG(
TEST_SRCS(main.py)
-DEPENDS(library/cpp/string_utils/base64/bench)
+DEPENDS(library/cpp/string_utils/base64/bench)
END()
diff --git a/library/cpp/string_utils/base64/bench/ya.make b/library/cpp/string_utils/base64/bench/ya.make
index 5ac5f3d6ce..61f0b6eb94 100644
--- a/library/cpp/string_utils/base64/bench/ya.make
+++ b/library/cpp/string_utils/base64/bench/ya.make
@@ -10,7 +10,7 @@ SRCS(
)
PEERDIR(
- library/cpp/string_utils/base64
+ library/cpp/string_utils/base64
)
END()
diff --git a/library/cpp/string_utils/base64/fuzz/generic/ya.make b/library/cpp/string_utils/base64/fuzz/generic/ya.make
index d155e2b0a0..fe3dba490e 100644
--- a/library/cpp/string_utils/base64/fuzz/generic/ya.make
+++ b/library/cpp/string_utils/base64/fuzz/generic/ya.make
@@ -6,7 +6,7 @@ OWNER(
FUZZ()
PEERDIR(
- library/cpp/string_utils/base64/fuzz/lib
+ library/cpp/string_utils/base64/fuzz/lib
)
END()
diff --git a/library/cpp/string_utils/base64/fuzz/lib/main.cpp b/library/cpp/string_utils/base64/fuzz/lib/main.cpp
index 28547ae7a5..e3dea7c437 100644
--- a/library/cpp/string_utils/base64/fuzz/lib/main.cpp
+++ b/library/cpp/string_utils/base64/fuzz/lib/main.cpp
@@ -1,4 +1,4 @@
-#include <library/cpp/string_utils/base64/base64.h>
+#include <library/cpp/string_utils/base64/base64.h>
#include <util/system/types.h>
#include <util/system/yassert.h>
diff --git a/library/cpp/string_utils/base64/fuzz/lib/ya.make b/library/cpp/string_utils/base64/fuzz/lib/ya.make
index 7b981b86a3..8a716861c8 100644
--- a/library/cpp/string_utils/base64/fuzz/lib/ya.make
+++ b/library/cpp/string_utils/base64/fuzz/lib/ya.make
@@ -10,7 +10,7 @@ SRCS(
)
PEERDIR(
- library/cpp/string_utils/base64
+ library/cpp/string_utils/base64
)
END()
diff --git a/library/cpp/string_utils/base64/ut/ya.make b/library/cpp/string_utils/base64/ut/ya.make
index 9b61241f0e..6b23486662 100644
--- a/library/cpp/string_utils/base64/ut/ya.make
+++ b/library/cpp/string_utils/base64/ut/ya.make
@@ -3,7 +3,7 @@ OWNER(
yazevnul
)
-UNITTEST_FOR(library/cpp/string_utils/base64)
+UNITTEST_FOR(library/cpp/string_utils/base64)
SRCS(
base64_ut.cpp
diff --git a/library/cpp/string_utils/levenshtein_diff/levenshtein_diff_ut.cpp b/library/cpp/string_utils/levenshtein_diff/levenshtein_diff_ut.cpp
index cf0f78637f..d81c583b02 100644
--- a/library/cpp/string_utils/levenshtein_diff/levenshtein_diff_ut.cpp
+++ b/library/cpp/string_utils/levenshtein_diff/levenshtein_diff_ut.cpp
@@ -1,6 +1,6 @@
#include "levenshtein_diff.h"
-#include <library/cpp/testing/unittest/registar.h>
+#include <library/cpp/testing/unittest/registar.h>
#include <util/generic/string.h>
diff --git a/library/cpp/string_utils/parse_size/parse_size_ut.cpp b/library/cpp/string_utils/parse_size/parse_size_ut.cpp
index 8fff4f56b2..49f2636785 100644
--- a/library/cpp/string_utils/parse_size/parse_size_ut.cpp
+++ b/library/cpp/string_utils/parse_size/parse_size_ut.cpp
@@ -1,6 +1,6 @@
#include "parse_size.h"
-#include <library/cpp/testing/unittest/registar.h>
+#include <library/cpp/testing/unittest/registar.h>
using namespace NSize;
diff --git a/library/cpp/string_utils/parse_size/ut/ya.make b/library/cpp/string_utils/parse_size/ut/ya.make
index da19cf025b..cb50b6f2da 100644
--- a/library/cpp/string_utils/parse_size/ut/ya.make
+++ b/library/cpp/string_utils/parse_size/ut/ya.make
@@ -1,4 +1,4 @@
-UNITTEST_FOR(library/cpp/string_utils/parse_size)
+UNITTEST_FOR(library/cpp/string_utils/parse_size)
OWNER(g:images-robot)
diff --git a/library/cpp/string_utils/quote/quote_ut.cpp b/library/cpp/string_utils/quote/quote_ut.cpp
index 6c552b279e..dc9c3c5dd6 100644
--- a/library/cpp/string_utils/quote/quote_ut.cpp
+++ b/library/cpp/string_utils/quote/quote_ut.cpp
@@ -1,6 +1,6 @@
#include "quote.h"
-#include <library/cpp/testing/unittest/registar.h>
+#include <library/cpp/testing/unittest/registar.h>
Y_UNIT_TEST_SUITE(TCGIEscapeTest) {
Y_UNIT_TEST(ReturnsEndOfTo) {
diff --git a/library/cpp/string_utils/quote/ut/ya.make b/library/cpp/string_utils/quote/ut/ya.make
index eca955144f..c8f5bc63ec 100644
--- a/library/cpp/string_utils/quote/ut/ya.make
+++ b/library/cpp/string_utils/quote/ut/ya.make
@@ -1,4 +1,4 @@
-UNITTEST_FOR(library/cpp/string_utils/quote)
+UNITTEST_FOR(library/cpp/string_utils/quote)
OWNER(vladon)
diff --git a/library/cpp/string_utils/relaxed_escaper/relaxed_escaper_ut.cpp b/library/cpp/string_utils/relaxed_escaper/relaxed_escaper_ut.cpp
index 768555ea3a..ec74798c30 100644
--- a/library/cpp/string_utils/relaxed_escaper/relaxed_escaper_ut.cpp
+++ b/library/cpp/string_utils/relaxed_escaper/relaxed_escaper_ut.cpp
@@ -1,6 +1,6 @@
#include "relaxed_escaper.h"
-#include <library/cpp/testing/unittest/registar.h>
+#include <library/cpp/testing/unittest/registar.h>
#define RESC_FIXED_STR(s) TStringBuf(s, sizeof(s) - 1)
static const TStringBuf CommonTestData[] = {
diff --git a/library/cpp/string_utils/relaxed_escaper/ut/ya.make b/library/cpp/string_utils/relaxed_escaper/ut/ya.make
index 7ebd393c48..10011e33d1 100644
--- a/library/cpp/string_utils/relaxed_escaper/ut/ya.make
+++ b/library/cpp/string_utils/relaxed_escaper/ut/ya.make
@@ -1,4 +1,4 @@
-UNITTEST_FOR(library/cpp/string_utils/relaxed_escaper)
+UNITTEST_FOR(library/cpp/string_utils/relaxed_escaper)
OWNER(velavokr)
diff --git a/library/cpp/string_utils/url/url.cpp b/library/cpp/string_utils/url/url.cpp
index 85f4ac5d69..376a09a465 100644
--- a/library/cpp/string_utils/url/url.cpp
+++ b/library/cpp/string_utils/url/url.cpp
@@ -73,31 +73,31 @@ namespace NUrl {
} // namespace NUrl
-size_t GetHttpPrefixSize(const char* url, bool ignorehttps) noexcept {
+size_t GetHttpPrefixSize(const char* url, bool ignorehttps) noexcept {
return GetHttpPrefixSizeImpl<char>(url, TUncheckedSize(), ignorehttps);
}
-size_t GetHttpPrefixSize(const wchar16* url, bool ignorehttps) noexcept {
+size_t GetHttpPrefixSize(const wchar16* url, bool ignorehttps) noexcept {
return GetHttpPrefixSizeImpl<wchar16>(url, TUncheckedSize(), ignorehttps);
}
-size_t GetHttpPrefixSize(const TStringBuf url, bool ignorehttps) noexcept {
+size_t GetHttpPrefixSize(const TStringBuf url, bool ignorehttps) noexcept {
return GetHttpPrefixSizeImpl<char>(url.data(), TKnownSize(url.size()), ignorehttps);
}
-size_t GetHttpPrefixSize(const TWtringBuf url, bool ignorehttps) noexcept {
+size_t GetHttpPrefixSize(const TWtringBuf url, bool ignorehttps) noexcept {
return GetHttpPrefixSizeImpl<wchar16>(url.data(), TKnownSize(url.size()), ignorehttps);
}
-TStringBuf CutHttpPrefix(const TStringBuf url, bool ignorehttps) noexcept {
+TStringBuf CutHttpPrefix(const TStringBuf url, bool ignorehttps) noexcept {
return CutHttpPrefixImpl(url, ignorehttps);
}
-TWtringBuf CutHttpPrefix(const TWtringBuf url, bool ignorehttps) noexcept {
+TWtringBuf CutHttpPrefix(const TWtringBuf url, bool ignorehttps) noexcept {
return CutHttpPrefixImpl(url, ignorehttps);
}
-size_t GetSchemePrefixSize(const TStringBuf url) noexcept {
+size_t GetSchemePrefixSize(const TStringBuf url) noexcept {
struct TDelim: public str_spn {
inline TDelim()
: str_spn("!-/:-@[-`{|}", true)
@@ -115,11 +115,11 @@ size_t GetSchemePrefixSize(const TStringBuf url) noexcept {
return n + 3 - url.begin();
}
-TStringBuf GetSchemePrefix(const TStringBuf url) noexcept {
+TStringBuf GetSchemePrefix(const TStringBuf url) noexcept {
return url.Head(GetSchemePrefixSize(url));
}
-TStringBuf CutSchemePrefix(const TStringBuf url) noexcept {
+TStringBuf CutSchemePrefix(const TStringBuf url) noexcept {
return url.Tail(GetSchemePrefixSize(url));
}
@@ -146,15 +146,15 @@ static inline TStringBuf GetHostAndPortImpl(const TStringBuf url) {
return urlNoScheme;
}
-TStringBuf GetHost(const TStringBuf url) noexcept {
+TStringBuf GetHost(const TStringBuf url) noexcept {
return GetHostAndPortImpl<false>(url);
}
-TStringBuf GetHostAndPort(const TStringBuf url) noexcept {
+TStringBuf GetHostAndPort(const TStringBuf url) noexcept {
return GetHostAndPortImpl<true>(url);
}
-TStringBuf GetSchemeHostAndPort(const TStringBuf url, bool trimHttp, bool trimDefaultPort) noexcept {
+TStringBuf GetSchemeHostAndPort(const TStringBuf url, bool trimHttp, bool trimDefaultPort) noexcept {
const size_t schemeSize = GetSchemePrefixSize(url);
const TStringBuf scheme = url.Head(schemeSize);
@@ -235,11 +235,11 @@ void GetSchemeHostAndPort(const TStringBuf url, TStringBuf& scheme, TStringBuf&
Y_ENSURE(isOk, "cannot parse port number from URL: " << url);
}
-TStringBuf GetOnlyHost(const TStringBuf url) noexcept {
+TStringBuf GetOnlyHost(const TStringBuf url) noexcept {
return GetHost(CutSchemePrefix(url));
}
-TStringBuf GetPathAndQuery(const TStringBuf url, bool trimFragment) noexcept {
+TStringBuf GetPathAndQuery(const TStringBuf url, bool trimFragment) noexcept {
const size_t off = url.find('/', GetHttpPrefixSize(url));
TStringBuf hostUnused, path;
if (!url.TrySplitAt(off, hostUnused, path))
@@ -249,7 +249,7 @@ TStringBuf GetPathAndQuery(const TStringBuf url, bool trimFragment) noexcept {
}
// this strange creature returns 2nd level domain, possibly with port
-TStringBuf GetDomain(const TStringBuf host) noexcept {
+TStringBuf GetDomain(const TStringBuf host) noexcept {
const char* c = !host ? host.data() : host.end() - 1;
for (bool wasPoint = false; c != host.data(); --c) {
if (*c == '.') {
@@ -263,7 +263,7 @@ TStringBuf GetDomain(const TStringBuf host) noexcept {
return TStringBuf(c, host.end());
}
-TStringBuf GetParentDomain(const TStringBuf host, size_t level) noexcept {
+TStringBuf GetParentDomain(const TStringBuf host, size_t level) noexcept {
size_t pos = host.size();
for (size_t i = 0; i < level; ++i) {
pos = host.rfind('.', pos);
@@ -273,11 +273,11 @@ TStringBuf GetParentDomain(const TStringBuf host, size_t level) noexcept {
return host.SubStr(pos + 1);
}
-TStringBuf GetZone(const TStringBuf host) noexcept {
+TStringBuf GetZone(const TStringBuf host) noexcept {
return GetParentDomain(host, 1);
}
-TStringBuf CutWWWPrefix(const TStringBuf url) noexcept {
+TStringBuf CutWWWPrefix(const TStringBuf url) noexcept {
if (url.size() >= 4 && url[3] == '.' && !strnicmp(url.data(), "www", 3))
return url.substr(4);
return url;
@@ -388,7 +388,7 @@ size_t NormalizeHostName(char* dest, const TStringBuf source, size_t dest_size,
return len;
}
-TStringBuf RemoveFinalSlash(TStringBuf str) noexcept {
+TStringBuf RemoveFinalSlash(TStringBuf str) noexcept {
if (str.EndsWith('/')) {
str.Chop(1);
}
diff --git a/library/cpp/string_utils/url/url.h b/library/cpp/string_utils/url/url.h
index 84137ccc57..64e82485a1 100644
--- a/library/cpp/string_utils/url/url.h
+++ b/library/cpp/string_utils/url/url.h
@@ -23,39 +23,39 @@ namespace NUrl {
} // namespace NUrl
-Y_PURE_FUNCTION
-size_t GetHttpPrefixSize(const char* url, bool ignorehttps = false) noexcept;
-Y_PURE_FUNCTION
-size_t GetHttpPrefixSize(const wchar16* url, bool ignorehttps = false) noexcept;
+Y_PURE_FUNCTION
+size_t GetHttpPrefixSize(const char* url, bool ignorehttps = false) noexcept;
+Y_PURE_FUNCTION
+size_t GetHttpPrefixSize(const wchar16* url, bool ignorehttps = false) noexcept;
-Y_PURE_FUNCTION
-size_t GetHttpPrefixSize(const TStringBuf url, bool ignorehttps = false) noexcept;
-
-Y_PURE_FUNCTION
-size_t GetHttpPrefixSize(const TWtringBuf url, bool ignorehttps = false) noexcept;
+Y_PURE_FUNCTION
+size_t GetHttpPrefixSize(const TStringBuf url, bool ignorehttps = false) noexcept;
+Y_PURE_FUNCTION
+size_t GetHttpPrefixSize(const TWtringBuf url, bool ignorehttps = false) noexcept;
+
/** BEWARE of TStringBuf! You can not use operator ~ or c_str() like in TString
!!!!!!!!!!!! */
-Y_PURE_FUNCTION
-size_t GetSchemePrefixSize(const TStringBuf url) noexcept;
+Y_PURE_FUNCTION
+size_t GetSchemePrefixSize(const TStringBuf url) noexcept;
-Y_PURE_FUNCTION
-TStringBuf GetSchemePrefix(const TStringBuf url) noexcept;
+Y_PURE_FUNCTION
+TStringBuf GetSchemePrefix(const TStringBuf url) noexcept;
//! removes protocol prefixes 'http://' and 'https://' from given URL
//! @note if URL has no prefix or some other prefix the function does nothing
//! @param url URL from which the prefix should be removed
//! @param ignorehttps if true, leaves https://
//! @return a new URL without protocol prefix
-Y_PURE_FUNCTION
-TStringBuf CutHttpPrefix(const TStringBuf url, bool ignorehttps = false) noexcept;
-
-Y_PURE_FUNCTION
-TWtringBuf CutHttpPrefix(const TWtringBuf url, bool ignorehttps = false) noexcept;
+Y_PURE_FUNCTION
+TStringBuf CutHttpPrefix(const TStringBuf url, bool ignorehttps = false) noexcept;
-Y_PURE_FUNCTION
-TStringBuf CutSchemePrefix(const TStringBuf url) noexcept;
+Y_PURE_FUNCTION
+TWtringBuf CutHttpPrefix(const TWtringBuf url, bool ignorehttps = false) noexcept;
+Y_PURE_FUNCTION
+TStringBuf CutSchemePrefix(const TStringBuf url) noexcept;
+
//! adds specified scheme prefix if URL has no scheme
//! @note if URL has scheme prefix already the function returns unchanged URL
TString AddSchemePrefix(const TString& url, const TStringBuf scheme);
@@ -63,15 +63,15 @@ TString AddSchemePrefix(const TString& url, const TStringBuf scheme);
//! Same as `AddSchemePrefix(url, "http")`.
TString AddSchemePrefix(const TString& url);
-Y_PURE_FUNCTION
-TStringBuf GetHost(const TStringBuf url) noexcept;
-
-Y_PURE_FUNCTION
-TStringBuf GetHostAndPort(const TStringBuf url) noexcept;
-
-Y_PURE_FUNCTION
-TStringBuf GetSchemeHostAndPort(const TStringBuf url, bool trimHttp = true, bool trimDefaultPort = true) noexcept;
+Y_PURE_FUNCTION
+TStringBuf GetHost(const TStringBuf url) noexcept;
+Y_PURE_FUNCTION
+TStringBuf GetHostAndPort(const TStringBuf url) noexcept;
+
+Y_PURE_FUNCTION
+TStringBuf GetSchemeHostAndPort(const TStringBuf url, bool trimHttp = true, bool trimDefaultPort = true) noexcept;
+
/**
* Splits URL to host and path
*
@@ -123,25 +123,25 @@ bool TryGetSchemeHostAndPort(const TStringBuf url, TStringBuf& scheme, TStringBu
*/
void GetSchemeHostAndPort(const TStringBuf url, TStringBuf& scheme, TStringBuf& host, ui16& port);
-Y_PURE_FUNCTION
-TStringBuf GetPathAndQuery(const TStringBuf url, bool trimFragment = true) noexcept;
+Y_PURE_FUNCTION
+TStringBuf GetPathAndQuery(const TStringBuf url, bool trimFragment = true) noexcept;
/**
* Extracts host from url and cuts http(https) protocol prefix and port if any.
* @param[in] url any URL
* @return host without port and http(https) prefix.
*/
-Y_PURE_FUNCTION
-TStringBuf GetOnlyHost(const TStringBuf url) noexcept;
-
-Y_PURE_FUNCTION
-TStringBuf GetParentDomain(const TStringBuf host, size_t level) noexcept; // ("www.ya.ru", 2) -> "ya.ru"
-
-Y_PURE_FUNCTION
-TStringBuf GetZone(const TStringBuf host) noexcept;
-
-Y_PURE_FUNCTION
-TStringBuf CutWWWPrefix(const TStringBuf url) noexcept;
-
+Y_PURE_FUNCTION
+TStringBuf GetOnlyHost(const TStringBuf url) noexcept;
+
+Y_PURE_FUNCTION
+TStringBuf GetParentDomain(const TStringBuf host, size_t level) noexcept; // ("www.ya.ru", 2) -> "ya.ru"
+
+Y_PURE_FUNCTION
+TStringBuf GetZone(const TStringBuf host) noexcept;
+
+Y_PURE_FUNCTION
+TStringBuf CutWWWPrefix(const TStringBuf url) noexcept;
+
Y_PURE_FUNCTION
TStringBuf CutWWWNumberedPrefix(const TStringBuf url) noexcept;
@@ -153,17 +153,17 @@ TStringBuf CutWWWNumberedPrefix(const TStringBuf url) noexcept;
* @param[in] url any URL
* @return url without 'm.' or 'M.' prefix.
*/
-Y_PURE_FUNCTION
+Y_PURE_FUNCTION
TStringBuf CutMPrefix(const TStringBuf url) noexcept;
Y_PURE_FUNCTION
-TStringBuf GetDomain(const TStringBuf host) noexcept; // should not be used
-
+TStringBuf GetDomain(const TStringBuf host) noexcept; // should not be used
+
size_t NormalizeUrlName(char* dest, const TStringBuf source, size_t dest_size);
size_t NormalizeHostName(char* dest, const TStringBuf source, size_t dest_size, ui16 defport = 80);
-Y_PURE_FUNCTION
-TStringBuf RemoveFinalSlash(TStringBuf str) noexcept;
+Y_PURE_FUNCTION
+TStringBuf RemoveFinalSlash(TStringBuf str) noexcept;
TStringBuf CutUrlPrefixes(TStringBuf url) noexcept;
bool DoesUrlPathStartWithToken(TStringBuf url, const TStringBuf& token) noexcept;
diff --git a/library/cpp/string_utils/url/url_ut.cpp b/library/cpp/string_utils/url/url_ut.cpp
index 1588013893..4fbab25081 100644
--- a/library/cpp/string_utils/url/url_ut.cpp
+++ b/library/cpp/string_utils/url/url_ut.cpp
@@ -2,7 +2,7 @@
#include <util/string/cast.h>
-#include <library/cpp/testing/unittest/registar.h>
+#include <library/cpp/testing/unittest/registar.h>
Y_UNIT_TEST_SUITE(TUtilUrlTest) {
Y_UNIT_TEST(TestGetHostAndGetHostAndPort) {
diff --git a/library/cpp/string_utils/url/ut/ya.make b/library/cpp/string_utils/url/ut/ya.make
index 0efa30e4d2..ca75e04baf 100644
--- a/library/cpp/string_utils/url/ut/ya.make
+++ b/library/cpp/string_utils/url/ut/ya.make
@@ -1,4 +1,4 @@
-UNITTEST_FOR(library/cpp/string_utils/url)
+UNITTEST_FOR(library/cpp/string_utils/url)
OWNER(g:util)
diff --git a/library/cpp/string_utils/ya.make b/library/cpp/string_utils/ya.make
index cd731bda95..932fb805d7 100644
--- a/library/cpp/string_utils/ya.make
+++ b/library/cpp/string_utils/ya.make
@@ -1,37 +1,37 @@
RECURSE(
- ascii_encode
- ascii_encode/ut
- base64
- base64/bench
- base64/bench/metrics
- base64/ut
- base64/fuzz
- csv
- csv/bench
- csv/ut
- col_diff
- col_diff/ut
- indent_text
+ ascii_encode
+ ascii_encode/ut
+ base64
+ base64/bench
+ base64/bench/metrics
+ base64/ut
+ base64/fuzz
+ csv
+ csv/bench
+ csv/ut
+ col_diff
+ col_diff/ut
+ indent_text
levenshtein_diff
levenshtein_diff/ut
- old_url_normalize
- old_url_normalize/ut
- parse_size
- parse_size/ut
- parse_vector
- parse_vector/ut
+ old_url_normalize
+ old_url_normalize/ut
+ parse_size
+ parse_size/ut
+ parse_vector
+ parse_vector/ut
secret_string
- quote
- quote/ut
- relaxed_escaper
- relaxed_escaper/ut
- scan
- subst_buf
- subst_buf/ut
- tskv_format
- tskv_format/ut
- tskv_format/fuzz
- url
- url/ut
+ quote
+ quote/ut
+ relaxed_escaper
+ relaxed_escaper/ut
+ scan
+ subst_buf
+ subst_buf/ut
+ tskv_format
+ tskv_format/ut
+ tskv_format/fuzz
+ url
+ url/ut
ztstrbuf
)