aboutsummaryrefslogtreecommitdiffstats
path: root/util/string
diff options
context:
space:
mode:
authorleo <leo@yandex-team.ru>2022-02-10 16:46:40 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:40 +0300
commit980edcd3304699edf9d4e4d6a656e585028e2a72 (patch)
tree139f47f3911484ae9af0eb347b1a88bd6c4bb35f /util/string
parentb036a557f285146e5e35d4213e29a094ab907bcf (diff)
downloadydb-980edcd3304699edf9d4e4d6a656e585028e2a72.tar.gz
Restoring authorship annotation for <leo@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/string')
-rw-r--r--util/string/cstriter.h2
-rw-r--r--util/string/strip_ut.cpp2
-rw-r--r--util/string/util.cpp6
-rw-r--r--util/string/util.h16
-rw-r--r--util/string/vector.h2
5 files changed, 14 insertions, 14 deletions
diff --git a/util/string/cstriter.h b/util/string/cstriter.h
index ca57728c39..2fa5576788 100644
--- a/util/string/cstriter.h
+++ b/util/string/cstriter.h
@@ -10,5 +10,5 @@ static inline bool operator==(It b, TCStringEndIterator) {
template <class It>
static inline bool operator!=(It b, TCStringEndIterator) {
- return !!*b;
+ return !!*b;
}
diff --git a/util/string/strip_ut.cpp b/util/string/strip_ut.cpp
index d1029d1498..7db5d4615a 100644
--- a/util/string/strip_ut.cpp
+++ b/util/string/strip_ut.cpp
@@ -134,5 +134,5 @@ Y_UNIT_TEST_SUITE(TStripStringTest) {
UNIT_ASSERT_EQUAL(abs1 == "Very long description string written in unknown language.", true);
UNIT_ASSERT_EQUAL(abs2 == "Very long description string written in unknown ...", true);
UNIT_ASSERT_EQUAL(abs3 == "Very long description string written in ...", true);
- }
+ }
}
diff --git a/util/string/util.cpp b/util/string/util.cpp
index b14f20bf75..3579dde04d 100644
--- a/util/string/util.cpp
+++ b/util/string/util.cpp
@@ -2,10 +2,10 @@
#include <util/generic/utility.h>
-#include <cstdio>
-#include <cstdarg>
+#include <cstdio>
+#include <cstdarg>
#include <cstdlib>
-
+
int a2i(const TString& s) {
return atoi(s.c_str());
}
diff --git a/util/string/util.h b/util/string/util.h
index 0d77a5042b..d423c328e6 100644
--- a/util/string/util.h
+++ b/util/string/util.h
@@ -2,10 +2,10 @@
//THIS FILE A COMPAT STUB HEADER
-#include <cstring>
+#include <cstring>
#include <cstdarg>
#include <algorithm>
-
+
#include <util/system/defaults.h>
#include <util/generic/string.h>
#include <util/generic/strbuf.h>
@@ -20,16 +20,16 @@ inline void RemoveIfLast(T& s, int c) {
const size_t length = s.length();
if (length && s[length - 1] == c)
s.remove(length - 1);
-}
-
+}
+
/// Adds lastCh symbol to the the of the string if it is not already there.
inline void addIfNotLast(TString& s, int lastCh) {
size_t len = s.length();
if (!len || s[len - 1] != lastCh) {
s.append(char(lastCh));
}
-}
-
+}
+
/// @details Finishes the string with lastCh1 if lastCh2 is not present in the string and lastCh1 is not already at the end of the string.
/// Else, if lastCh2 is not equal to the symbol before the last, it finishes the string with lastCh2.
/// @todo ?? Define, when to apply the function. Is in use several times for URLs parsing.
@@ -41,8 +41,8 @@ inline void addIfAbsent(TString& s, char lastCh1, char lastCh2) {
} else if (pos < s.length() - 1) {
addIfNotLast(s, lastCh2);
}
-}
-
+}
+
/// @}
/*
diff --git a/util/string/vector.h b/util/string/vector.h
index e36c348bbe..6769446810 100644
--- a/util/string/vector.h
+++ b/util/string/vector.h
@@ -1,5 +1,5 @@
#pragma once
-
+
#include "cast.h"
#include "split.h"