StringComparisonOperator
public enum StringComparisonOperator : RawRepresentable
Represents available string comparison operations to perform with NSPredicate
API.
Enum value describing NSPredicate string comparison operator.
equals
:==
operatorbeginsWith
:BEGINSWITH
operatorcontains
:CONTAINS
operatorendsWith
:ENDSWITH
operatorlike
:LIKE
operatormatches
:MATCHES
operatorother
: Custom operator
-
==
operatorDeclaration
Swift
case equals
-
BEGINSWITH
operatorDeclaration
Swift
case beginsWith
-
CONTAINS
operatorDeclaration
Swift
case contains
-
ENDSWITH
operatorDeclaration
Swift
case endsWith
-
LIKE
operatorDeclaration
Swift
case like
-
MATCHES
operatorDeclaration
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
.