predicates::str

Function is_empty

Source
pub fn is_empty() -> IsEmptyPredicate
Expand description

Creates a new Predicate that ensures a str is empty

ยงExamples

use predicates::prelude::*;

let predicate_fn = predicate::str::is_empty();
assert_eq!(true, predicate_fn.eval(""));
assert_eq!(false, predicate_fn.eval("Food World"));