Function yn::is_somewhat_yes [−][src]
pub fn is_somewhat_yes(
string: impl Display
) -> bool
Determines if a value is somewhat yes.
Returns true when the value is something in the trend of "really y"
, "wow so y"
, very true
, 0 but is actually 1!
, contains y here
.
Examples
input should be somewhat yes:
assert!(yn::is_somewhat_yes("yes")); // yes is still somewhat yes assert!(yn::is_somewhat_yes("really y")); assert!(yn::is_somewhat_yes("wow so y")); assert!(yn::is_somewhat_yes("very true")); assert!(yn::is_somewhat_yes("0 but is actually 1!")); assert!(yn::is_somewhat_yes("contains y here"));
should definitely not be somewhat yes:
assert!(!yn::is_somewhat_yes("no no noooo")); assert!(!yn::is_somewhat_yes("many no's")); assert!(!yn::is_somewhat_yes("very very false"));