aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/deprecated/split/delim_string_iter.cpp
diff options
context:
space:
mode:
authoryuliy <yuliy@yandex-team.ru>2022-02-10 16:50:10 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:10 +0300
commitdf5f2b17d65c239ec8d68fdf518fcbea2bcc0bfe (patch)
treecc7288225ae23e459fe89ae954054ab490ae214c /library/cpp/deprecated/split/delim_string_iter.cpp
parent7cba2edf1dbe4bc03ee23552d0a418bf48eb3a13 (diff)
downloadydb-df5f2b17d65c239ec8d68fdf518fcbea2bcc0bfe.tar.gz
Restoring authorship annotation for <yuliy@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/deprecated/split/delim_string_iter.cpp')
-rw-r--r--library/cpp/deprecated/split/delim_string_iter.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/library/cpp/deprecated/split/delim_string_iter.cpp b/library/cpp/deprecated/split/delim_string_iter.cpp
index af418c5bfb..8470a8587b 100644
--- a/library/cpp/deprecated/split/delim_string_iter.cpp
+++ b/library/cpp/deprecated/split/delim_string_iter.cpp
@@ -1,45 +1,45 @@
#include "delim_string_iter.h"
-
-//
+
+//
// TKeyValueDelimStringIter
-//
-
+//
+
void TKeyValueDelimStringIter::ReadKeyAndValue() {
- TStringBuf currentToken(*DelimIter);
-
- size_t pos = currentToken.find('=');
+ TStringBuf currentToken(*DelimIter);
+
+ size_t pos = currentToken.find('=');
if (pos == TString::npos) {
- ChunkValue.Clear();
- ChunkKey = currentToken;
- } else {
- ChunkKey = currentToken.SubStr(0, pos);
- ChunkValue = currentToken.SubStr(pos + 1);
- }
-}
-
+ ChunkValue.Clear();
+ ChunkKey = currentToken;
+ } else {
+ ChunkKey = currentToken.SubStr(0, pos);
+ ChunkValue = currentToken.SubStr(pos + 1);
+ }
+}
+
TKeyValueDelimStringIter::TKeyValueDelimStringIter(const TStringBuf str, const TStringBuf delim)
- : DelimIter(str, delim)
-{
- if (DelimIter.Valid())
- ReadKeyAndValue();
-}
-
+ : DelimIter(str, delim)
+{
+ if (DelimIter.Valid())
+ ReadKeyAndValue();
+}
+
bool TKeyValueDelimStringIter::Valid() const {
- return DelimIter.Valid();
-}
-
+ return DelimIter.Valid();
+}
+
TKeyValueDelimStringIter& TKeyValueDelimStringIter::operator++() {
- ++DelimIter;
- if (DelimIter.Valid())
- ReadKeyAndValue();
-
- return *this;
-}
-
+ ++DelimIter;
+ if (DelimIter.Valid())
+ ReadKeyAndValue();
+
+ return *this;
+}
+
const TStringBuf& TKeyValueDelimStringIter::Key() const {
- return ChunkKey;
-}
-
+ return ChunkKey;
+}
+
const TStringBuf& TKeyValueDelimStringIter::Value() const {
- return ChunkValue;
-}
+ return ChunkValue;
+}