MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / stringToBool

Function stringToBool

src/Core/SettingsFields.cpp:34–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34bool stringToBool(const String & str)
35{
36 if (str == "0")
37 return false;
38 if (str == "1")
39 return true;
40 if (boost::iequals(str, "false"))
41 return false;
42 if (boost::iequals(str, "true"))
43 return true;
44 throw Exception(ErrorCodes::CANNOT_PARSE_BOOL, "Cannot parse bool from string '{}'", str);
45}
46
47namespace
48{

Callers 2

stringToNumberFunction · 0.85
validateAnalyzerSettingsFunction · 0.85

Calls 1

ExceptionClass · 0.50

Tested by

no test coverage detected