Skip to main content

str_to_bool

Function str_to_bool 

Source
pub fn str_to_bool(val: &str) -> Option<bool>
Expand description

Parse a string into an optional boolean value.

Returns Some(true) for truthy values (1/true/on/yes/y, case-insensitive). Returns Some(false) for falsy values (0/false/off/no/n, case-insensitive). Returns None for unrecognized values.