Function predicates::prelude::predicate::str::diff[][src]

pub fn diff<S>(orig: S) -> DifferencePredicate where
    S: Into<Cow<'static, str>>, 

Creates a new Predicate that diffs two strings.

Examples

use predicates::prelude::*;

let predicate_fn = predicate::str::diff("Hello World");
assert_eq!(false, predicate_fn.eval("Hello World"));
assert_eq!(true, predicate_fn.eval("Goodbye World"));