MatchCollector

public protocol MatchCollector: MatchBehavior

Matcher that can find multiple match instances

  • matches(in:) Default implementation

    gets all the matches

    Default Implementation

    Declaration

    Swift

    func matches(in: String) -> [SubstringFragment]
  • matches(in:configuredBy:) Default implementation

    gets all the matches filtered to a configuration

    Default Implementation

    Declaration

    Swift

    func matches(in: String, configuredBy: SearchConfig) -> [SubstringFragment]
  • matchRanges(in:) Default implementation

    gets all the match ranges

    Default Implementation

    Declaration

    Swift

    func matchRanges(in: String) -> [RangeFragment]
  • matchRanges(in:configuredBy:) Default implementation

    gets all the match ranges filtered by the given configuration

    Default Implementation

    Declaration

    Swift

    func matchRanges(in: String, configuredBy: SearchConfig) -> [RangeFragment]
  • supportsSubMatches Default implementation

    true if the type supports matches within matched regions

    Default Implementation

    true if the type supports matches within matched regions

    Declaration

    Swift

    var supportsSubMatches: Bool