Pattern
public protocol Pattern: MatchChecker,
RangeFinder, SubstringFinder,
MatchCollector, MatchIterator,
Fragmenter, Splitter,
Replacer
This framework’s main protocol, Pattern, consolidates various aspects of a matcher. The protocol adds the ability to combine, via boolean-logic operators, sub-types for building even more complex matching bahaviors.
-
inverse
Default implementationinverts the matching bahavior
Default Implementation
create a new pattern that has a inverse matching stratergy
Declaration
Swift
var inverse: Pattern
-
and(_:)
Default implementationjoins with another pattern for a Boolean AND operation
Default Implementation
Join the given pattern in an AND boolean operation
Declaration
Swift
func and(_: Pattern) -> Pattern
-
or(_:)
Default implementationjoins with another pattern for a Boolean OR operation
Default Implementation
Join the given pattern in an OR boolean operation
Declaration
Swift
func or(_: Pattern) -> Pattern