diff options
author | dobrokot <dobrokot@yandex-team.ru> | 2022-02-10 16:49:07 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:07 +0300 |
commit | 8d57b69dee81198a59c39e64704f7dc9f04b4fbf (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /util/generic/strbuf.h | |
parent | 25d83bf841d8b3ce3886525078f1964ac3c293c5 (diff) | |
download | ydb-8d57b69dee81198a59c39e64704f7dc9f04b4fbf.tar.gz |
Restoring authorship annotation for <dobrokot@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic/strbuf.h')
-rw-r--r-- | util/generic/strbuf.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/util/generic/strbuf.h b/util/generic/strbuf.h index ab463595a9..70b9360d58 100644 --- a/util/generic/strbuf.h +++ b/util/generic/strbuf.h @@ -321,19 +321,19 @@ public: inline bool AfterPrefix(const TdSelf& prefix, TdSelf& result) const noexcept { if (this->StartsWith(prefix)) { result = Tail(prefix.size()); - return true; - } - return false; - } - + return true; + } + return false; + } + inline bool BeforeSuffix(const TdSelf& suffix, TdSelf& result) const noexcept { if (this->EndsWith(suffix)) { result = Head(size() - suffix.size()); - return true; - } - return false; - } - + return true; + } + return false; + } + // returns true if string started with `prefix`, false otherwise inline bool SkipPrefix(const TdSelf& prefix) noexcept { return AfterPrefix(prefix, *this); |