MCPcopy Create free account
hub / github.com/apache/arrow / ParseBoolean

Function ParseBoolean

cpp/src/arrow/util/string.cc:207–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207Result<bool> ParseBoolean(std::string_view value) {
208 if (AsciiEqualsCaseInsensitive(value, "true") || value == "1") {
209 return true;
210 } else if (AsciiEqualsCaseInsensitive(value, "false") || value == "0") {
211 return false;
212 } else {
213 return Status::Invalid("String is not a valid boolean value: '", value, "'.");
214 }
215}
216
217} // namespace internal
218} // namespace arrow

Callers 3

ExtractFromUriQueryMethod · 0.85
FromUriMethod · 0.85
FromUriMethod · 0.85

Calls 2

InvalidFunction · 0.50

Tested by

no test coverage detected