diff options
author | orivej <orivej@yandex-team.ru> | 2022-02-10 16:44:49 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:49 +0300 |
commit | 718c552901d703c502ccbefdfc3c9028d608b947 (patch) | |
tree | 46534a98bbefcd7b1f3faa5b52c138ab27db75b7 /util/generic/string.cpp | |
parent | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (diff) | |
download | ydb-718c552901d703c502ccbefdfc3c9028d608b947.tar.gz |
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/generic/string.cpp')
-rw-r--r-- | util/generic/string.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/util/generic/string.cpp b/util/generic/string.cpp index 3c655f1f66..1dc9a8b445 100644 --- a/util/generic/string.cpp +++ b/util/generic/string.cpp @@ -19,17 +19,17 @@ std::istream& operator>>(std::istream& is, TString& s) { } template <> -bool TBasicString<char, std::char_traits<char>>::to_lower(size_t pos, size_t n) { +bool TBasicString<char, std::char_traits<char>>::to_lower(size_t pos, size_t n) { return Transform([](size_t, char c) { return AsciiToLower(c); }, pos, n); } template <> -bool TBasicString<char, std::char_traits<char>>::to_upper(size_t pos, size_t n) { +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) { +bool TBasicString<char, std::char_traits<char>>::to_title(size_t pos, size_t n) { if (n == 0) { return false; } @@ -39,7 +39,7 @@ bool TBasicString<char, std::char_traits<char>>::to_title(size_t pos, size_t n) template <> TUtf16String& -TBasicString<wchar16, std::char_traits<wchar16>>::AppendAscii(const ::TStringBuf& s) { +TBasicString<wchar16, std::char_traits<wchar16>>::AppendAscii(const ::TStringBuf& s) { ReserveAndResize(size() + s.size()); auto dst = begin() + size() - s.size(); @@ -53,7 +53,7 @@ TBasicString<wchar16, std::char_traits<wchar16>>::AppendAscii(const ::TStringBuf template <> TUtf16String& -TBasicString<wchar16, std::char_traits<wchar16>>::AppendUtf8(const ::TStringBuf& s) { +TBasicString<wchar16, std::char_traits<wchar16>>::AppendUtf8(const ::TStringBuf& s) { size_t oldSize = size(); ReserveAndResize(size() + s.size() * 4); size_t written = 0; @@ -67,23 +67,23 @@ TBasicString<wchar16, std::char_traits<wchar16>>::AppendUtf8(const ::TStringBuf& } template <> -bool TBasicString<wchar16, std::char_traits<wchar16>>::to_lower(size_t pos, size_t n) { +bool TBasicString<wchar16, std::char_traits<wchar16>>::to_lower(size_t pos, size_t n) { return ToLower(*this, pos, n); } template <> -bool TBasicString<wchar16, std::char_traits<wchar16>>::to_upper(size_t pos, size_t n) { +bool TBasicString<wchar16, std::char_traits<wchar16>>::to_upper(size_t pos, size_t n) { return ToUpper(*this, pos, n); } template <> -bool TBasicString<wchar16, std::char_traits<wchar16>>::to_title(size_t pos, size_t n) { +bool TBasicString<wchar16, std::char_traits<wchar16>>::to_title(size_t pos, size_t n) { return ToTitle(*this, pos, n); } template <> TUtf32String& -TBasicString<wchar32, std::char_traits<wchar32>>::AppendAscii(const ::TStringBuf& s) { +TBasicString<wchar32, std::char_traits<wchar32>>::AppendAscii(const ::TStringBuf& s) { ReserveAndResize(size() + s.size()); auto dst = begin() + size() - s.size(); @@ -96,8 +96,8 @@ TBasicString<wchar32, std::char_traits<wchar32>>::AppendAscii(const ::TStringBuf } template <> -TBasicString<char, std::char_traits<char>>& -TBasicString<char, std::char_traits<char>>::AppendUtf16(const ::TWtringBuf& s) { +TBasicString<char, std::char_traits<char>>& +TBasicString<char, std::char_traits<char>>::AppendUtf16(const ::TWtringBuf& s) { const size_t oldSize = size(); ReserveAndResize(size() + WideToUTF8BufferSize(s.size())); @@ -111,7 +111,7 @@ TBasicString<char, std::char_traits<char>>::AppendUtf16(const ::TWtringBuf& s) { template <> TUtf32String& -TBasicString<wchar32, std::char_traits<wchar32>>::AppendUtf8(const ::TStringBuf& s) { +TBasicString<wchar32, std::char_traits<wchar32>>::AppendUtf8(const ::TStringBuf& s) { size_t oldSize = size(); ReserveAndResize(size() + s.size() * 4); size_t written = 0; @@ -126,7 +126,7 @@ TBasicString<wchar32, std::char_traits<wchar32>>::AppendUtf8(const ::TStringBuf& template <> TUtf32String& -TBasicString<wchar32, std::char_traits<wchar32>>::AppendUtf16(const ::TWtringBuf& s) { +TBasicString<wchar32, std::char_traits<wchar32>>::AppendUtf16(const ::TWtringBuf& s) { size_t oldSize = size(); ReserveAndResize(size() + s.size() * 2); @@ -141,16 +141,16 @@ TBasicString<wchar32, std::char_traits<wchar32>>::AppendUtf16(const ::TWtringBuf } template <> -bool TBasicString<wchar32, std::char_traits<wchar32>>::to_lower(size_t pos, size_t n) { +bool TBasicString<wchar32, std::char_traits<wchar32>>::to_lower(size_t pos, size_t n) { return ToLower(*this, pos, n); } template <> -bool TBasicString<wchar32, std::char_traits<wchar32>>::to_upper(size_t pos, size_t n) { +bool TBasicString<wchar32, std::char_traits<wchar32>>::to_upper(size_t pos, size_t n) { return ToUpper(*this, pos, n); } template <> -bool TBasicString<wchar32, std::char_traits<wchar32>>::to_title(size_t pos, size_t n) { +bool TBasicString<wchar32, std::char_traits<wchar32>>::to_title(size_t pos, size_t n) { return ToTitle(*this, pos, n); } |