PredicateOptions
public struct PredicateOptions: OptionSet
An OptionSetType that describes the options in which to create a string comparison.
-
The raw value of the given
PredicateOptionsvalue.Declaration
Swift
public let rawValue: UInt32 -
The raw value of the given
PredicateOptionsvalue.Declaration
Swift
public init(rawValue: UInt32)Parameters
rawValueThe raw value of the option set to create. Each bit of
rawValuepotentially represents an element of the option set, though raw values may include bits that are not defined as distinct values of theOptionSettype. -
The strictest comparison option. When comparing two strings, the left and right hand side MUST equal each other and is diacritic AND case-sensitive.
Declaration
Swift
public static let None = PredicateOptions(rawValue: 1<<0) -
When comparing two strings, the predicate system will ignore case. For example, the characters ‘e’ and ‘E’ will match.
Declaration
Swift
public static let CaseInsensitive = PredicateOptions(rawValue: 1<<1) -
When comparing two strings, the predicate system will ignore diacritic characters and normalize the special character to its base character. For example, the characters
e é ê èare all equivalent.Declaration
Swift
public static let DiacriticInsensitive = PredicateOptions(rawValue: 1<<2)
PredicateOptions Struct Reference