StringComparisonOperator

public enum StringComparisonOperator: RawRepresentable

Represents available string comparison operations to perform with NSPredicate API.

  • equals: == operator
  • beginsWith: BEGINSWITH operator
  • contains: CONTAINS operator
  • endsWith: ENDSWITH operator
  • like: LIKE operator
  • matches: MATCHES operator
  • other: Custom operator
  • Custom string operator.

    Declaration

    Swift

    case other(comparisonOperator: String)
  • String representation of the self.

    Declaration

    Swift

    public var rawValue: String
  • Initialize comparison operator with string.

    Declaration

    Swift

    public init(rawValue: String)

    Parameters

    rawValue

    String to use. If it doesn’t match any preexisting cases, it will be parsed as .other.