Creates a new instance from the given string.
If the string passed as `stringValue` does not correspond to any instance
of this type, the result is `nil`.
- parameter stringValue: The string value of the desired key.
get · iOS 18.0+
stringValue
TypeScript
get stringValue(): string
Swift declaration
var stringValue: String { get }
The string to use in a named collection (e.g. a string-keyed dictionary).
Creates a new instance from the specified integer.
If the value passed as `intValue` does not correspond to any instance of
this type, the result is `nil`.
- parameter intValue: The integer value of the desired key.
get · iOS 18.0+
intValue
TypeScript
get intValue(): (number) | null
Swift declaration
var intValue: Int? { get }
The value to use in an integer-indexed collection (e.g. an int-keyed
dictionary).