MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / StringToBool

Function StringToBool

oneflow/core/common/util.cpp:122–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122bool StringToBool(const std::string& str) {
123 return CaseInsensitiveStringEquals(str, "1") || CaseInsensitiveStringEquals(str, "true")
124 || CaseInsensitiveStringEquals(str, "yes") || CaseInsensitiveStringEquals(str, "on")
125 || CaseInsensitiveStringEquals(str, "y");
126}
127
128bool StringToInteger(const std::string& str, int64_t* value) {
129 char* end;

Callers 1

ParseBooleanFromEnvFunction · 0.85

Calls 1

Tested by

no test coverage detected