diff options
| author | babenko <[email protected]> | 2025-07-14 17:30:01 +0300 |
|---|---|---|
| committer | babenko <[email protected]> | 2025-07-14 18:59:50 +0300 |
| commit | 552acf29b10e279e67a90cf1136a30aa57f5dcd1 (patch) | |
| tree | 3dd6521d6878a5884f9cbb6fdd06f1c195b37d8e /library/cpp/yt/string/string.cpp | |
| parent | 9c3d6f63ae9bcef86f6871dab9b4e57bd97d35a9 (diff) | |
YT-18571: Rename TCaseInsensitiveStringEqualityComparer -> TCaseInsensitiveStringEqualComparer, add TCaseInsensitiveStringLessComparer
commit_hash:2dbe3c3cf419a5310e7bf45d161f839e99040788
Diffstat (limited to 'library/cpp/yt/string/string.cpp')
| -rw-r--r-- | library/cpp/yt/string/string.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/library/cpp/yt/string/string.cpp b/library/cpp/yt/string/string.cpp index 7d58d474382..a346219144c 100644 --- a/library/cpp/yt/string/string.cpp +++ b/library/cpp/yt/string/string.cpp @@ -322,11 +322,16 @@ size_t TCaseInsensitiveStringHasher::operator()(TStringBuf arg) const } } -bool TCaseInsensitiveStringEqualityComparer::operator()(TStringBuf lhs, TStringBuf rhs) const +bool TCaseInsensitiveStringEqualComparer::operator()(TStringBuf lhs, TStringBuf rhs) const { return AsciiEqualsIgnoreCase(lhs, rhs); } +bool TCaseInsensitiveStringLessComparer::operator()(TStringBuf lhs, TStringBuf rhs) const +{ + return AsciiCompareIgnoreCase(lhs, rhs) < 0; +} + //////////////////////////////////////////////////////////////////////////////// bool TryParseBool(TStringBuf value, bool* result) |
