Converts the given string into a boolean, returning true if successful.
Synopsis
Declared in <absl/strings/numbers.h>
[[nodiscard]]
bool
SimpleAtob(
std::string_view str,
bool* out);
Description
The following case‐insensitive strings are interpreted as boolean true: "true", "t", "yes", "y", "1". The following case‐insensitive strings are interpreted as boolean false: "false", "f", "no", "n", "0". If any errors are encountered, this function returns false, leaving out in an unspecified state.
Return Value
true on success; otherwise false.
|
Note
|
The return value should not be discarded. |
Parameters
Name |
Description |
str |
The string to parse. |
out |
The location that receives the parsed value. |
Created with MrDocs