Instance Method


Transliterates the receiver by applying a specified ICU string transform.


- (BOOL)applyTransform:(NSStringTransform)transform reverse:(BOOL)reverse range:(NSRange)range updatedRange:(NSRangePointer)resultingRange;



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 NO.


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 NO.


The range of the string to transform. range must not exceed the bounds of the receiver.


If the transform was successfully applied, upon return contains the range of the transformed string.

Return Value

YES if the transform was successfully applied. Otherwise, NO.


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.

See Also

Modifying a String

- appendFormat:

Adds a constructed string to the receiver.

- appendString:

Adds to the end of the receiver the characters of a given string.

- deleteCharactersInRange:

Removes from the receiver the characters in a given range.

- insertString:atIndex:

Inserts into the receiver the characters of a given string at a given location.

- replaceCharactersInRange:withString:

Replaces the characters from aRange with those in aString.

- replaceOccurrencesOfString:withString:options:range:

Replaces all occurrences of a given string in a given range with another given string, returning the number of replacements.

- setString:

Replaces the characters of the receiver with those in a given string.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software