diff options
author | krock21 <krock21@yandex-team.ru> | 2022-02-10 16:46:02 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:02 +0300 |
commit | 4aae166b5d23fd02653919f43e2015cd636fa6fd (patch) | |
tree | 70e52225c1ede3476f358bc4699197ace987d46d /util/string/vector.cpp | |
parent | 9ab30620977aa96ae9e9da959e2f7e1370cb796d (diff) | |
download | ydb-4aae166b5d23fd02653919f43e2015cd636fa6fd.tar.gz |
Restoring authorship annotation for <krock21@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/string/vector.cpp')
-rw-r--r-- | util/string/vector.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/util/string/vector.cpp b/util/string/vector.cpp index 9ba401f0a2..5bb5fbfe3b 100644 --- a/util/string/vector.cpp +++ b/util/string/vector.cpp @@ -5,12 +5,12 @@ #include <util/system/defaults.h> template <class TConsumer, class TDelim, typename TChr> -static inline void DoSplit2(TConsumer& c, TDelim& d, const TBasicStringBuf<TChr> str, int) { - SplitString(str.data(), str.data() + str.size(), d, c); +static inline void DoSplit2(TConsumer& c, TDelim& d, const TBasicStringBuf<TChr> str, int) { + SplitString(str.data(), str.data() + str.size(), d, c); } template <class TConsumer, class TDelim, typename TChr> -static inline void DoSplit1(TConsumer& cc, TDelim& d, const TBasicStringBuf<TChr> str, int opts) { +static inline void DoSplit1(TConsumer& cc, TDelim& d, const TBasicStringBuf<TChr> str, int opts) { if (opts & KEEP_EMPTY_TOKENS) { DoSplit2(cc, d, str, opts); } else { @@ -21,11 +21,11 @@ static inline void DoSplit1(TConsumer& cc, TDelim& d, const TBasicStringBuf<TChr } template <class C, class TDelim, typename TChr> -static inline void DoSplit0(C* res, const TBasicStringBuf<TChr> str, TDelim& d, size_t maxFields, int options) { +static inline void DoSplit0(C* res, const TBasicStringBuf<TChr> str, TDelim& d, size_t maxFields, int options) { using TStringType = std::conditional_t<std::is_same<TChr, wchar16>::value, TUtf16String, TString>; res->clear(); - if (!str.data()) { + if (!str.data()) { return; } @@ -38,7 +38,7 @@ static inline void DoSplit0(C* res, const TBasicStringBuf<TChr> str, TDelim& d, DoSplit1(lc, d, str, options); if (lc.Last) { - res->push_back(TStringType(lc.Last, str.data() + str.size() - lc.Last)); + res->push_back(TStringType(lc.Last, str.data() + str.size() - lc.Last)); } } else { DoSplit1(cc, d, str, options); @@ -64,19 +64,19 @@ static void SplitStringImplT(TVector<std::conditional_t<std::is_same<TChr, wchar } void ::NPrivate::SplitStringImpl(TVector<TString>* res, const char* ptr, const char* delim, size_t maxFields, int options) { - return SplitStringImplT<char>(res, TStringBuf(ptr), delim, maxFields, options); + return SplitStringImplT<char>(res, TStringBuf(ptr), delim, maxFields, options); } void ::NPrivate::SplitStringImpl(TVector<TString>* res, const char* ptr, size_t len, const char* delim, size_t maxFields, int options) { - return SplitStringImplT<char>(res, TStringBuf(ptr, len), delim, maxFields, options); + return SplitStringImplT<char>(res, TStringBuf(ptr, len), delim, maxFields, options); } void ::NPrivate::SplitStringImpl(TVector<TUtf16String>* res, const wchar16* ptr, const wchar16* delimiter, size_t maxFields, int options) { - return SplitStringImplT<wchar16>(res, TWtringBuf(ptr), delimiter, maxFields, options); + return SplitStringImplT<wchar16>(res, TWtringBuf(ptr), delimiter, maxFields, options); } void ::NPrivate::SplitStringImpl(TVector<TUtf16String>* res, const wchar16* ptr, size_t len, const wchar16* delimiter, size_t maxFields, int options) { - return SplitStringImplT<wchar16>(res, TWtringBuf(ptr, len), delimiter, maxFields, options); + return SplitStringImplT<wchar16>(res, TWtringBuf(ptr, len), delimiter, maxFields, options); } TUtf16String JoinStrings(const TVector<TUtf16String>& v, const TWtringBuf delim) { |