Module predicates::str[][src]

String Predicates

This module contains predicates specific to string handling.

Structs

ContainsPredicate

Predicate that checks for patterns.

DifferencePredicate

Predicate that diffs two strings.

EndsWithPredicate

Predicate checks end of str

IsEmptyPredicate

Predicate that checks for empty strings.

MatchesPredicate

Predicate that checks for repeated patterns.

NormalizedPredicate

Predicate adapter that normalizes the newlines contained in the variable being tested.

RegexPredicate

Predicate that uses regex matching

StartsWithPredicate

Predicate checks start of str

TrimPredicate

Predicate adaper that trims the variable being tested.

Utf8Predicate

Predicate adaper that converts a str predicate to byte predicate.

Traits

PredicateStrExt

Predicate extension adapting a str Predicate.

Functions

contains

Creates a new Predicate that ensures a str contains pattern

diff

Creates a new Predicate that diffs two strings.

ends_with

Creates a new Predicate that ensures a str ends with pattern

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 with pattern

Type Definitions

RegexError

An error that occurred during parsing or compiling a regular expression.