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

Function IsTrue

util/string/type.cpp:64–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62} // anonymous namespace
63
64bool IsTrue(const TStringBuf v) noexcept {
65 static constexpr std::array<TStringBuf, 7> trueOptions{
66 "true",
67 "t",
68 "yes",
69 "y",
70 "on",
71 "1",
72 "da"};
73 return IsCaseInsensitiveAnyOf(v, trueOptions);
74}
75
76bool IsFalse(const TStringBuf v) noexcept {
77 static constexpr std::array<TStringBuf, 7> falseOptions{

Callers 5

Y_UNIT_TESTFunction · 0.70
TryFromStringImpl<bool>Function · 0.70
GetValueMethod · 0.50
GetBooleanRobustMethod · 0.50
GetBooleanRobustMethod · 0.50

Calls 1

IsCaseInsensitiveAnyOfFunction · 0.85

Tested by

no test coverage detected