Expand description
String Predicates
This module contains predicates specific to string handling.
Structs§
- Contains
Predicate - Predicate that checks for patterns.
- Difference
Predicate - Predicate that diffs two strings.
- Ends
With Predicate - Predicate checks end of str
- IsEmpty
Predicate - Predicate that checks for empty strings.
- Matches
Predicate - Predicate that checks for repeated patterns.
- Normalized
Predicate - Predicate adapter that normalizes the newlines contained in the variable being tested.
- Regex
Predicate - Predicate that uses regex matching
- Starts
With Predicate - Predicate checks start of str
- Trim
Predicate - Predicate adaper that trims the variable being tested.
- Utf8
Predicate - Predicate adaper that converts a
str
predicate to byte predicate.
Traits§
- Predicate
StrExt Predicate
extension adapting astr
Predicate.
Functions§
- contains
- Creates a new
Predicate
that ensures a str containspattern
- diff
- Creates a new
Predicate
that diffs two strings. - ends_
with - Creates a new
Predicate
that ensures a str ends withpattern
- is_
empty - Creates a new
Predicate
that ensures a str is empty - is_
match - Creates a new
Predicate
that uses a regular expression to match the string. - similar
- Creates a new
Predicate
that checks strings for how similar they are. - starts_
with - Creates a new
Predicate
that ensures a str starts withpattern
Type Aliases§
- Regex
Error - An error that occurred during parsing or compiling a regular expression.