pub fn interpret_bool(str_value: &str) -> bool
Expand description

| Interpret a string argument as a boolean. | | The definition of LocaleIndependentAtoi() | requires that non-numeric string values | like “foo”, return 0. This means that | if a user unintentionally supplies | a non-integer argument here, the return | value is always false. This means that | | -foo=false does what the user probably | expects, but -foo=true is well defined | but does not do what they probably expected. | | The return value of LocaleIndependentAtoi(…) | is zero when given input not representable | as an int. | | For a more extensive discussion of this | topic (and a wide range of opinions on | the Right Way to change this code), see | PR12713. |