aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/string/string.cpp
diff options
context:
space:
mode:
authorsandello <sandello@yandex-team.ru>2022-02-10 16:49:52 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:52 +0300
commit9541fc30d6f0877db9ff199a16f7fc2505d46a5c (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/yt/string/string.cpp
parent0cdbcf332f1f329f0a3d6759462ad71e7867ac08 (diff)
downloadydb-9541fc30d6f0877db9ff199a16f7fc2505d46a5c.tar.gz
Restoring authorship annotation for <sandello@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/yt/string/string.cpp')
-rw-r--r--library/cpp/yt/string/string.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/library/cpp/yt/string/string.cpp b/library/cpp/yt/string/string.cpp
index b24a2c4aa5..7440ac3fdd 100644
--- a/library/cpp/yt/string/string.cpp
+++ b/library/cpp/yt/string/string.cpp
@@ -13,22 +13,22 @@ namespace NYT {
void UnderscoreCaseToCamelCase(TStringBuilderBase* builder, TStringBuf str)
{
- bool first = true;
+ bool first = true;
bool upper = true;
for (char c : str) {
if (c == '_') {
upper = true;
} else {
if (upper) {
- if (!std::isalpha(c) && !first) {
+ if (!std::isalpha(c) && !first) {
builder->AppendChar('_');
- }
+ }
c = std::toupper(c);
}
builder->AppendChar(c);
upper = false;
}
- first = false;
+ first = false;
}
}
@@ -43,11 +43,11 @@ void CamelCaseToUnderscoreCase(TStringBuilderBase* builder, TStringBuf str)
{
bool first = true;
for (char c : str) {
- if (std::isupper(c) && std::isalpha(c)) {
+ if (std::isupper(c) && std::isalpha(c)) {
if (!first) {
builder->AppendChar('_');
}
- c = std::tolower(c);
+ c = std::tolower(c);
}
builder->AppendChar(c);
first = false;
@@ -63,7 +63,7 @@ TString CamelCaseToUnderscoreCase(TStringBuf str)
////////////////////////////////////////////////////////////////////////////////
-TString TrimLeadingWhitespaces(const TString& str)
+TString TrimLeadingWhitespaces(const TString& str)
{
for (int i = 0; i < static_cast<int>(str.size()); ++i) {
if (str[i] != ' ') {
@@ -73,7 +73,7 @@ TString TrimLeadingWhitespaces(const TString& str)
return "";
}
-TString Trim(const TString& str, const TString& whitespaces)
+TString Trim(const TString& str, const TString& whitespaces)
{
size_t end = str.size();
while (end > 0) {