Function mockall::predicate::str::ends_with

source ·
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"));