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
commit99609724f661f7e21d1cb08e8d80e87c3632fdb3 (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /util/string
parent980edcd3304699edf9d4e4d6a656e585028e2a72 (diff)
downloadydb-99609724f661f7e21d1cb08e8d80e87c3632fdb3.tar.gz
Restoring authorship annotation for <leo@yandex-team.ru>. Commit 2 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 2fa5576788c..ca57728c396 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 7db5d4615a9..d1029d1498a 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 3579dde04d6..b14f20bf75a 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 d423c328e6a..0d77a5042b8 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 6769446810d..e36c348bbef 100644
--- a/util/string/vector.h
+++ b/util/string/vector.h
@@ -1,5 +1,5 @@
#pragma once
-
+
#include "cast.h"
#include "split.h"