| 32 | } |
| 33 | |
| 34 | bool 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 | |
| 47 | namespace |
| 48 | { |
no test coverage detected