String

struct String
  • Matches string using regular expression. The instance itself must be a valid regex pattern

    Parameter

    Parameter string: String to validate

    Returns

    true if value matches the regex else false

    Declaration

    Swift

    public func matchesString(_ string: String) -> Bool

    Parameters

    string

    String to validate

    Return Value

    true if value matches the regex else false