MCPcopy Create free account
hub / github.com/catboost/catboost / IsCaseInsensitiveAnyOf

Function IsCaseInsensitiveAnyOf

util/string/type.cpp:54–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52namespace {
53 template <size_t N>
54 bool IsCaseInsensitiveAnyOf(TStringBuf str, const std::array<TStringBuf, N>& options) {
55 for (auto option : options) {
56 if (str.size() == option.size() && ::strnicmp(str.data(), option.data(), str.size()) == 0) {
57 return true;
58 }
59 }
60 return false;
61 }
62} // anonymous namespace
63
64bool IsTrue(const TStringBuf v) noexcept {

Callers 2

IsTrueFunction · 0.85
IsFalseFunction · 0.85

Calls 2

sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected