stefans-utils 0.12.0

A collection of useful Rust utility functions, types, and traits.
Documentation
use crate::as_bool::AsBool;

impl AsBool for str {
    fn as_bool(&self) -> bool {
        matches!(
            self,
            "true"
                | "TRUE"
                | "True"
                | "truE"
                | "trUe"
                | "trUE"
                | "tRue"
                | "tRuE"
                | "tRUe"
                | "tRUE"
                | "TruE"
                | "TrUe"
                | "TrUE"
                | "TRue"
                | "TRuE"
                | "TRUe"
        )
    }
}