diff options
author | Alexander Fokin <apfokin@gmail.com> | 2022-02-10 16:45:38 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:38 +0300 |
commit | bf9e69a933f89af083d895185f01ed65e4d90766 (patch) | |
tree | b2cc84ee7850122e7ccf51d0ea21e4fa7e7a5685 /util/string/subst.cpp | |
parent | 863a59a65247c24db7cb06789bc5cf79d04da32f (diff) | |
download | ydb-bf9e69a933f89af083d895185f01ed65e4d90766.tar.gz |
Restoring authorship annotation for Alexander Fokin <apfokin@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'util/string/subst.cpp')
-rw-r--r-- | util/string/subst.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/util/string/subst.cpp b/util/string/subst.cpp index f9036f8ef6..b2df328dc1 100644 --- a/util/string/subst.cpp +++ b/util/string/subst.cpp @@ -43,9 +43,9 @@ static bool IsIntersect(const T& a, const U& b) noexcept { * Uses two separate implementations (inplace for shrink and append for grow case) * See IGNIETFERRO-394 **/ -template <class TStringType, typename TStringViewType = TBasicStringBuf<typename TStringType::value_type>> +template <class TStringType, typename TStringViewType = TBasicStringBuf<typename TStringType::value_type>> static inline size_t SubstGlobalImpl(TStringType& s, const TStringViewType from, const TStringViewType to, size_t fromPos = 0) { - if (from.empty()) { + if (from.empty()) { return 0; } @@ -174,7 +174,7 @@ size_t SubstGlobal(TUtf32String& text, const TUtf32StringBuf what, const TUtf32S } size_t SubstGlobal(std::u16string& text, const TWtringBuf what, const TWtringBuf with, size_t from) { - return SubstGlobalImpl(text, + return SubstGlobalImpl(text, std::u16string_view(reinterpret_cast<const char16_t*>(what.data()), what.size()), std::u16string_view(reinterpret_cast<const char16_t*>(with.data()), with.size()), from); |