aboutsummaryrefslogtreecommitdiffstats
path: root/util/string/vector.h
diff options
context:
space:
mode:
authormanavrion <manavrion@yandex-team.ru>2022-02-10 16:49:16 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:16 +0300
commit29d0b2eeae154d04156e0698067c0c21a97ea61d (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /util/string/vector.h
parent109de9f4c31b6caaa736ce29a61fce05851e7c02 (diff)
downloadydb-29d0b2eeae154d04156e0698067c0c21a97ea61d.tar.gz
Restoring authorship annotation for <manavrion@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/string/vector.h')
-rw-r--r--util/string/vector.h80
1 files changed, 40 insertions, 40 deletions
diff --git a/util/string/vector.h b/util/string/vector.h
index 392c12cbb8..e36c348bbe 100644
--- a/util/string/vector.h
+++ b/util/string/vector.h
@@ -15,54 +15,54 @@
//
// 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,
- const wchar16* delimiter, size_t maxFields, int options);
-
- template <typename C>
- struct TStringDeducer;
-
- template <>
- struct TStringDeducer<char> {
- using type = TString;
- };
-
- template <>
- struct TStringDeducer<wchar16> {
- using type = TUtf16String;
- };
-}
-
-template <typename C>
-TVector<typename ::NPrivate::TStringDeducer<C>::type>
-SplitString(const C* ptr, const C* delimiter,
- size_t maxFields = 0, int options = 0) {
- TVector<typename ::NPrivate::TStringDeducer<C>::type> res;
+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,
+ const wchar16* delimiter, size_t maxFields, int options);
+
+ template <typename C>
+ struct TStringDeducer;
+
+ template <>
+ struct TStringDeducer<char> {
+ using type = TString;
+ };
+
+ template <>
+ struct TStringDeducer<wchar16> {
+ using type = TUtf16String;
+ };
+}
+
+template <typename C>
+TVector<typename ::NPrivate::TStringDeducer<C>::type>
+SplitString(const C* ptr, const C* delimiter,
+ size_t maxFields = 0, int options = 0) {
+ TVector<typename ::NPrivate::TStringDeducer<C>::type> res;
::NPrivate::SplitStringImpl(&res, ptr, delimiter, maxFields, options);
return res;
}
-template <typename C>
-TVector<typename ::NPrivate::TStringDeducer<C>::type>
-SplitString(const C* ptr, size_t len, const C* delimiter,
- size_t maxFields = 0, int options = 0) {
- TVector<typename ::NPrivate::TStringDeducer<C>::type> res;
+template <typename C>
+TVector<typename ::NPrivate::TStringDeducer<C>::type>
+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;
}
-template <typename C>
-TVector<typename ::NPrivate::TStringDeducer<C>::type>
-SplitString(const typename ::NPrivate::TStringDeducer<C>::type& str, const C* delimiter,
- size_t maxFields = 0, int options = 0) {
+template <typename C>
+TVector<typename ::NPrivate::TStringDeducer<C>::type>
+SplitString(const typename ::NPrivate::TStringDeducer<C>::type& str, const C* delimiter,
+ size_t maxFields = 0, int options = 0) {
return SplitString(str.data(), str.size(), delimiter, maxFields, options);
}