Factory

public final class Factory

A factory class that exposes the different patterns that this library offers

  • creates an empty matcher

    Declaration

    Swift

    static func empty() -> Pattern
  • creates a regular expression pattern

    Declaration

    Swift

    static func regex(_ pattern: String, matchCase: Bool = false) -> Pattern
  • creates a whole word matcher

    Declaration

    Swift

    static func word(_ word: String, matchCase: Bool = false) -> Pattern
  • creates a prefix matcher

    Declaration

    Swift

    static func prefix(_ text: String, matchCase: Bool = false) -> Pattern
  • creates a suffix matcher

    Declaration

    Swift

    static func suffix(_ text: String, matchCase: Bool = false) -> Pattern
  • creates a plain text matcher

    Declaration

    Swift

    static func text(_ text: String, matchCase: Bool = false) -> Pattern
  • creates a wildcard (aka UNIX glob) pattern

    Declaration

    Swift

    static func wildcard(_ pattern: String, matchCase: Bool = false) -> Pattern
  • creates a XCode-finder-like pattern

    Declaration

    Swift

    static func xcodeFilter(of input: String) -> Pattern