Protocols
The following protocols are available globally.
-
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.
See moreDeclaration
Swift
public protocol Pattern: MatchChecker, RangeFinder, SubstringFinder, MatchCollector, MatchIterator, Fragmenter, Splitter, Replacer
-
The simplest matcher – one that finds if the match exists or not
See moreDeclaration
Swift
public protocol MatchChecker: MatchBehavior
-
A utility variation of RangeFinder, that returns Substring value instead of range
See moreDeclaration
Swift
public protocol SubstringFinder: MatchBehavior
-
Matcher that can find multiple match instances
See moreDeclaration
Swift
public protocol MatchCollector: MatchBehavior
-
A pattern type that can breakdown a string into matches, sub-matches, and unmatched fragments
See moreDeclaration
Swift
public protocol Fragmenter: MatchBehavior
-
Matcher that specializes in breaking string value into substring values
See moreDeclaration
Swift
public protocol Splitter: MatchBehavior
-
Matcher that can transform strings by replacing matched areas
See moreDeclaration
Swift
public protocol Replacer: MatchBehavior
-
An iterator type to traverse the string fragments, both match and unmatched elements
See moreDeclaration
Swift
public protocol MatchIterator: MatchBehavior
-
Marker protocol for match behaviors
Declaration
Swift
public protocol MatchBehavior
-
The matcher that can find the location of the match
See moreDeclaration
Swift
public protocol RangeFinder: MatchBehavior