diff options
author | krock21 <krock21@yandex-team.ru> | 2022-02-10 16:46:02 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:02 +0300 |
commit | 4aae166b5d23fd02653919f43e2015cd636fa6fd (patch) | |
tree | 70e52225c1ede3476f358bc4699197ace987d46d /library/cpp/charset/ci_string.cpp | |
parent | 9ab30620977aa96ae9e9da959e2f7e1370cb796d (diff) | |
download | ydb-4aae166b5d23fd02653919f43e2015cd636fa6fd.tar.gz |
Restoring authorship annotation for <krock21@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/charset/ci_string.cpp')
-rw-r--r-- | library/cpp/charset/ci_string.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/library/cpp/charset/ci_string.cpp b/library/cpp/charset/ci_string.cpp index 6097e40131..dcd1dbf9e1 100644 --- a/library/cpp/charset/ci_string.cpp +++ b/library/cpp/charset/ci_string.cpp @@ -12,20 +12,20 @@ int TCiString::compare(const TCiString& s1, const char* p, const CodePage& cp) { return cp.stricmp(s1.data(), p); } -int TCiString::compare(const TStringBuf& p1, const TStringBuf& p2, const CodePage& cp) { - int rv = cp.strnicmp(p1.data(), p2.data(), Min(p1.size(), p2.size())); - return rv ? rv : p1.size() < p2.size() ? -1 : p1.size() == p2.size() ? 0 : 1; +int TCiString::compare(const TStringBuf& p1, const TStringBuf& p2, const CodePage& cp) { + int rv = cp.strnicmp(p1.data(), p2.data(), Min(p1.size(), p2.size())); + return rv ? rv : p1.size() < p2.size() ? -1 : p1.size() == p2.size() ? 0 : 1; } -bool TCiString::is_prefix(const TStringBuf& what, const TStringBuf& of, const CodePage& cp) { - size_t len = what.size(); - return len <= of.size() && cp.strnicmp(what.data(), of.data(), len) == 0; +bool TCiString::is_prefix(const TStringBuf& what, const TStringBuf& of, const CodePage& cp) { + size_t len = what.size(); + return len <= of.size() && cp.strnicmp(what.data(), of.data(), len) == 0; } -bool TCiString::is_suffix(const TStringBuf& what, const TStringBuf& of, const CodePage& cp) { - size_t len = what.size(); - size_t slen = of.size(); - return (len <= slen) && (0 == cp.strnicmp(what.data(), of.data() + slen - len, len)); +bool TCiString::is_suffix(const TStringBuf& what, const TStringBuf& of, const CodePage& cp) { + size_t len = what.size(); + size_t slen = of.size(); + return (len <= slen) && (0 == cp.strnicmp(what.data(), of.data() + slen - len, len)); } size_t TCiString::hashVal(const char* s, size_t len, const CodePage& cp) { |