applyTransform(_:reverse:range:updatedRange:)
Transliterates the receiver by applying a specified ICU string transform.
Declaration
func applyTransform(_ transform: StringTransform, reverse: Bool, range: NSRange, updatedRange resultingRange: NSRangePointer?) -> BoolParameters
- transform:
The transformation to apply. For a list of possible values, see String Transformations. If the specified transform does not exist, the receiver is not modified, and this method returns False.
- reverse:
Whether an inverse transform should be used. If the specified transform does not have an inverse, the receiver is not modified, and this method returns False.
- range:
The range of the string to transform.
rangemust not exceed the bounds of the receiver. - resultingRange:
If the transform was successfully applied, upon return contains the range of the transformed string.
Return Value
true if the transform was successfully applied. Otherwise, false.
Discussion
In addition to the provided transformation constants, you may use any valid ICU transform ID as defined in the ICU User Guide. However, arbitrary ICU transform rules are not supported.