parse_bool

Function parse_bool 

Source
pub const fn parse_bool(s: &[u8]) -> Result<bool, ParseError>
Expand description

Parses a boolean from a byte slice.

Case-insensitive, ignores leading and trailing whitespace, and accepts "0", "f", "n", "no", "off", and "false" for false, and "1", "t", "y", "on", "yes", and "true" for true.

See Syntax for information on what strings this function accepts.