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 | 937a6bb8d7c82d8d9d717f2bf6ce6c592a443641 (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/charset/ci_string.cpp | |
parent | 4aae166b5d23fd02653919f43e2015cd636fa6fd (diff) | |
download | ydb-937a6bb8d7c82d8d9d717f2bf6ce6c592a443641.tar.gz |
Restoring authorship annotation for <krock21@yandex-team.ru>. Commit 2 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 dcd1dbf9e1..6097e40131 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) { |