Function predicates::prelude::predicate::str::ends_with [−][src]
pub fn ends_with<P>(pattern: P) -> EndsWithPredicate where
P: Into<String>,
Expand description
Creates a new Predicate
that ensures a str ends with pattern
Examples
use predicates::prelude::*; let predicate_fn = predicate::str::ends_with("World"); assert_eq!(true, predicate_fn.eval("Hello World")); assert_eq!(false, predicate_fn.eval("Hello Moon"));