diff options
author | iseg <iseg@yandex-team.ru> | 2022-02-10 16:49:39 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:39 +0300 |
commit | 8b71ce88bea710a9663bb143e4916f961c57212e (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /util/generic | |
parent | f828a15ab90e9ca8e848f83caf95c95f06be46e7 (diff) | |
download | ydb-8b71ce88bea710a9663bb143e4916f961c57212e.tar.gz |
Restoring authorship annotation for <iseg@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic')
-rw-r--r-- | util/generic/strbase.h | 2 | ||||
-rw-r--r-- | util/generic/string.cpp | 12 | ||||
-rw-r--r-- | util/generic/string.h | 10 |
3 files changed, 12 insertions, 12 deletions
diff --git a/util/generic/strbase.h b/util/generic/strbase.h index 432cc515ff4..ab39fc7537f 100644 --- a/util/generic/strbase.h +++ b/util/generic/strbase.h @@ -12,7 +12,7 @@ #include <util/system/yassert.h> #include <contrib/libs/libc_compat/string.h> - + #include <cctype> #include <cstring> #include <string> diff --git a/util/generic/string.cpp b/util/generic/string.cpp index b505b03a3ff..3c655f1f663 100644 --- a/util/generic/string.cpp +++ b/util/generic/string.cpp @@ -1,5 +1,5 @@ #include "string.h" - + #include <util/string/ascii.h> #include <util/system/sanitizers.h> #include <util/system/sys_alloc.h> @@ -26,17 +26,17 @@ bool TBasicString<char, std::char_traits<char>>::to_lower(size_t pos, size_t n) template <> bool TBasicString<char, std::char_traits<char>>::to_upper(size_t pos, size_t n) { return Transform([](size_t, char c) { return AsciiToUpper(c); }, pos, n); -} - +} + template <> bool TBasicString<char, std::char_traits<char>>::to_title(size_t pos, size_t n) { if (n == 0) { return false; - } + } bool changed = to_upper(pos, 1); return to_lower(pos + 1, n - 1) || changed; -} - +} + template <> TUtf16String& TBasicString<wchar16, std::char_traits<wchar16>>::AppendAscii(const ::TStringBuf& s) { diff --git a/util/generic/string.h b/util/generic/string.h index 685bd1febc6..8cd8aa6917f 100644 --- a/util/generic/string.h +++ b/util/generic/string.h @@ -19,7 +19,7 @@ #include "strbase.h" #include "strbuf.h" #include "string_hash.h" - + #if defined(address_sanitizer_enabled) || defined(thread_sanitizer_enabled) #include "hide_ptr.h" #endif @@ -306,7 +306,7 @@ public: return ConstRef().c_str(); } - // ~~~ STL compatible method to obtain data pointer ~~~ + // ~~~ STL compatible method to obtain data pointer ~~~ iterator begin() { return &*MutRef().begin(); } @@ -314,7 +314,7 @@ public: iterator vend() { return &*MutRef().end(); } - + reverse_iterator rbegin() { return reverse_iterator(vend()); } @@ -1092,7 +1092,7 @@ public: return *this; } - + TBasicString& replace(size_t pos, size_t n, const TCharType* s, size_t len) Y_NOEXCEPT { MutRef().replace(pos, n, s, len); @@ -1116,7 +1116,7 @@ public: return *this; } - + void swap(TBasicString& s) noexcept { #ifdef TSTRING_IS_STD_STRING std::swap(Storage_, s.Storage_); |