diff options
author | tobo <tobo@yandex-team.ru> | 2022-02-10 16:47:27 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:27 +0300 |
commit | 55a7f90e4cd31e9481cace8ee5dfd682c27e810e (patch) | |
tree | 9814fbd1c3effac9b8377c5d604b367b14e2db55 /util/generic/strbase.h | |
parent | 7fe839092527589b38f014d854c51565b3c1adfa (diff) | |
download | ydb-55a7f90e4cd31e9481cace8ee5dfd682c27e810e.tar.gz |
Restoring authorship annotation for <tobo@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic/strbase.h')
-rw-r--r-- | util/generic/strbase.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/util/generic/strbase.h b/util/generic/strbase.h index 66361b9b27..ab39fc7537 100644 --- a/util/generic/strbase.h +++ b/util/generic/strbase.h @@ -107,10 +107,10 @@ public: using const_reverse_iterator = TReverseIteratorBase<const_iterator>; static constexpr size_t StrLen(const TCharType* s) noexcept { - if (Y_LIKELY(s)) { + if (Y_LIKELY(s)) { return TTraits::length(s); - } - return 0; + } + return 0; } template <class TCharTraits> @@ -172,7 +172,7 @@ public: return Ptr()[Len() - 1]; } - inline TCharType front() const noexcept { + inline TCharType front() const noexcept { Y_ASSERT(!empty()); return Ptr()[0]; } @@ -261,16 +261,16 @@ public: return s1.AsStringView() == s2.AsStringView(); } - static bool equal(const TSelf& s1, const TCharType* p) noexcept { - if (p == nullptr) { - return s1.Len() == 0; - } - + static bool equal(const TSelf& s1, const TCharType* p) noexcept { + if (p == nullptr) { + return s1.Len() == 0; + } + return s1.AsStringView() == p; } - static bool equal(const TCharType* p, const TSelf& s2) noexcept { - return equal(s2, p); + static bool equal(const TCharType* p, const TSelf& s2) noexcept { + return equal(s2, p); } static bool equal(const TStringView s1, const TStringView s2) noexcept { |