dimfeld / rust_lenient_bool

A more accepting boolean token parser.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

A more accepting boolean token parser.

License:Apache License 2.0


Languages

Language:Rust 100.0%