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 adapter that trims the variable being tested.
- Utf8
Predicate - Predicate adapter that converts a
strpredicate to byte predicate.
Traits§
- Predicate
StrExt Predicateextension adapting astrPredicate.
Functions§
- contains
- Creates a new
Predicatethat ensures a str containspattern - diff
- Creates a new
Predicatethat diffs two strings. - ends_
with - Creates a new
Predicatethat ensures a str ends withpattern - is_
empty - Creates a new
Predicatethat ensures a str is empty - is_
match - Creates a new
Predicatethat uses a regular expression to match the string. - starts_
with - Creates a new
Predicatethat ensures a str starts withpattern
Type Aliases§
- Regex
Error - An error that occurred during parsing or compiling a regular expression.