StringComparisonOperator
public enum StringComparisonOperator : RawRepresentable
Represents available string comparison operations to perform with NSPredicate API.
Enum value describing NSPredicate string comparison operator.
equals:==operatorbeginsWith:BEGINSWITHoperatorcontains:CONTAINSoperatorendsWith:ENDSWITHoperatorlike:LIKEoperatormatches:MATCHESoperatorother: Custom operator
-
==operatorDeclaration
Swift
case equals -
BEGINSWITHoperatorDeclaration
Swift
case beginsWith -
CONTAINSoperatorDeclaration
Swift
case contains -
ENDSWITHoperatorDeclaration
Swift
case endsWith -
LIKEoperatorDeclaration
Swift
case like -
MATCHESoperatorDeclaration
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
rawValueString to use. If it doesn’t match any preexisting cases, it will be parsed as
.other.
StringComparisonOperator Enumeration Reference