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

Function TryParseBool

library/cpp/yt/string/string.cpp:321–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319////////////////////////////////////////////////////////////////////////////////
320
321bool TryParseBool(TStringBuf value, bool* result)
322{
323 if (value == "true" || value == "1") {
324 *result = true;
325 return true;
326 } else if (value == "false" || value == "0") {
327 *result = false;
328 return true;
329 } else {
330 return false;
331 }
332}
333
334bool ParseBool(TStringBuf value)
335{

Callers 1

ParseBoolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected