diff options
author | leo <leo@yandex-team.ru> | 2022-02-10 16:46:40 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:40 +0300 |
commit | 980edcd3304699edf9d4e4d6a656e585028e2a72 (patch) | |
tree | 139f47f3911484ae9af0eb347b1a88bd6c4bb35f /util/string/util.h | |
parent | b036a557f285146e5e35d4213e29a094ab907bcf (diff) | |
download | ydb-980edcd3304699edf9d4e4d6a656e585028e2a72.tar.gz |
Restoring authorship annotation for <leo@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/string/util.h')
-rw-r--r-- | util/string/util.h | 16 |
1 files changed, 8 insertions, 8 deletions
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); } -} - +} + /// @} /* |