aboutsummaryrefslogtreecommitdiffstats
path: root/util/string
diff options
context:
space:
mode:
authorsankear <sankear@yandex-team.ru>2022-02-10 16:50:10 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:10 +0300
commitaed1c1c7782eb0a0536e5b25bbed950b397e0ac8 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /util/string
parent7377d7b033ffbef85e9bb0bf35091a8e79ed422c (diff)
downloadydb-aed1c1c7782eb0a0536e5b25bbed950b397e0ac8.tar.gz
Restoring authorship annotation for <sankear@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/string')
-rw-r--r--util/string/vector.cpp18
-rw-r--r--util/string/vector.h10
2 files changed, 14 insertions, 14 deletions
diff --git a/util/string/vector.cpp b/util/string/vector.cpp
index 1e8ddae94f..9ba401f0a2 100644
--- a/util/string/vector.cpp
+++ b/util/string/vector.cpp
@@ -12,7 +12,7 @@ static inline void DoSplit2(TConsumer& c, TDelim& d, const TBasicStringBuf<TChr>
template <class TConsumer, class TDelim, typename TChr>
static inline void DoSplit1(TConsumer& cc, TDelim& d, const TBasicStringBuf<TChr> str, int opts) {
if (opts & KEEP_EMPTY_TOKENS) {
- DoSplit2(cc, d, str, opts);
+ DoSplit2(cc, d, str, opts);
} else {
TSkipEmptyTokens<TConsumer> sc(&cc);
@@ -35,13 +35,13 @@ static inline void DoSplit0(C* res, const TBasicStringBuf<TChr> str, TDelim& d,
if (maxFields) {
TLimitingConsumer<TConsumer, const TChr> lc(maxFields, &cc);
- DoSplit1(lc, d, str, options);
+ DoSplit1(lc, d, str, options);
if (lc.Last) {
res->push_back(TStringType(lc.Last, str.data() + str.size() - lc.Last));
}
} else {
- DoSplit1(cc, d, str, options);
+ DoSplit1(cc, d, str, options);
}
}
@@ -55,11 +55,11 @@ static void SplitStringImplT(TVector<std::conditional_t<std::is_same<TChr, wchar
if (*(delim + 1)) {
TStringDelimiter<const TChr> d(delim, std::char_traits<TChr>::length(delim));
- DoSplit0(res, str, d, maxFields, options);
+ DoSplit0(res, str, d, maxFields, options);
} else {
TCharDelimiter<const TChr> d(*delim);
- DoSplit0(res, str, d, maxFields, options);
+ DoSplit0(res, str, d, maxFields, options);
}
}
@@ -69,16 +69,16 @@ void ::NPrivate::SplitStringImpl(TVector<TString>* res, const char* ptr, const c
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);
-}
-
+}
+
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);
}
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);
-}
-
+}
+
TUtf16String JoinStrings(const TVector<TUtf16String>& v, const TWtringBuf delim) {
return JoinStrings(v.begin(), v.end(), delim);
}
diff --git a/util/string/vector.h b/util/string/vector.h
index d01d9403c3..e36c348bbe 100644
--- a/util/string/vector.h
+++ b/util/string/vector.h
@@ -16,12 +16,12 @@
// NOTE: Check StringSplitter below to get more convenient split string interface.
namespace NPrivate {
-
+
void SplitStringImpl(TVector<TString>* res, const char* ptr,
const char* delimiter, size_t maxFields, int options);
void SplitStringImpl(TVector<TString>* res, const char* ptr, size_t len,
const char* delimiter, size_t maxFields, int options);
-
+
void SplitStringImpl(TVector<TUtf16String>* res, const wchar16* ptr,
const wchar16* delimiter, size_t maxFields, int options);
void SplitStringImpl(TVector<TUtf16String>* res, const wchar16* ptr, size_t len,
@@ -56,9 +56,9 @@ SplitString(const C* ptr, size_t len, const C* delimiter,
size_t maxFields = 0, int options = 0) {
TVector<typename ::NPrivate::TStringDeducer<C>::type> res;
::NPrivate::SplitStringImpl(&res, ptr, len, delimiter, maxFields, options);
- return res;
-}
-
+ return res;
+}
+
template <typename C>
TVector<typename ::NPrivate::TStringDeducer<C>::type>
SplitString(const typename ::NPrivate::TStringDeducer<C>::type& str, const C* delimiter,