/rust_lenient_bool

A more accepting boolean token parser.

Primary LanguageRustApache License 2.0Apache-2.0

LenientBool

crates.io

This crate provides the LenientBool type, which performs the following string -> bool conversions:

  • true, t, yes, y, and 1 to true
  • false, f, no, n, and 0 to false

Comparisons are case-insensitive, so TRUE, tRue, and T all work, for example.

Documentation

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.