StringComparisonOperator

public enum StringComparisonOperator : RawRepresentable

Represents available string comparison operations to perform with NSPredicate API.

Enum value describing NSPredicate string comparison operator.

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

    Declaration

    Swift

    case equals
  • BEGINSWITH operator

    Declaration

    Swift

    case beginsWith
  • CONTAINS operator

    Declaration

    Swift

    case contains
  • ENDSWITH operator

    Declaration

    Swift

    case endsWith
  • LIKE operator

    Declaration

    Swift

    case like
  • MATCHES operator

    Declaration

    Swift

    case matches
  • Custom string operator.

    Declaration

    Swift

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

    Declaration

    Swift

    public var rawValue: String { get }
  • 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.