diff options
author | Vlad Yaroslavlev <vladon@vladon.com> | 2022-02-10 16:46:23 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:23 +0300 |
commit | 706b83ed7de5a473436620367af31fc0ceecde07 (patch) | |
tree | 103305d30dec77e8f6367753367f59b3cd68f9f1 /util/string/util.cpp | |
parent | 918e8a1574070d0ec733f0b76cfad8f8892ad2e5 (diff) | |
download | ydb-706b83ed7de5a473436620367af31fc0ceecde07.tar.gz |
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 1 of 2.
Diffstat (limited to 'util/string/util.cpp')
-rw-r--r-- | util/string/util.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/util/string/util.cpp b/util/string/util.cpp index b14f20bf75..a528489b9b 100644 --- a/util/string/util.cpp +++ b/util/string/util.cpp @@ -6,7 +6,7 @@ #include <cstdarg> #include <cstdlib> -int a2i(const TString& s) { +int a2i(const TString& s) { return atoi(s.c_str()); } @@ -49,20 +49,20 @@ Tr::Tr(const char* from, const char* to) { } } -size_t Tr::FindFirstChangePosition(const TString& str) const { +size_t Tr::FindFirstChangePosition(const TString& str) const { for (auto it = str.begin(); it != str.end(); ++it) { if (ConvertChar(*it) != *it) { return it - str.begin(); } } - return TString::npos; + return TString::npos; } -void Tr::Do(TString& str) const { +void Tr::Do(TString& str) const { const size_t changePosition = FindFirstChangePosition(str); - if (changePosition == TString::npos) { + if (changePosition == TString::npos) { return; } |