Module pattern

Source
Expand description

Abstractions for working with patterns.

Structs§

AnyChar
A pattern that matches anything.
NotEscaped
Pattern that matches pattern Inner not escaped by Prefix. “escaped” here means that the pattern Inner is preceded by an odd number of contiguous Prefixes.

Traits§

Pattern
This trait represents an object that can be matched onto a string. This includes functions, characters, [arrays of] characters, strings, but also custom patterns like NotEscaped

Functions§

parse
Parses 1 instance of pattern pat.
parse_group
Parse a balanced group of open & close patterns.
parse_until
Parses a span of the input until a match of pattern pat is met.
parse_until_ex
Like parse_until, but also removes the match of pat from the rest of the input.
parse_while
Parses contiguous instances of pattern pat.