Contents

CFStringTransform(_:_:_:_:)

Perform in-place transliteration on a mutable string.

Declaration

func CFStringTransform(_ string: CFMutableString!, _ range: UnsafeMutablePointer<CFRange>!, _ transform: CFString!, _ reverse: Bool) -> Bool

Parameters

  • string:

    The string to transform.

  • range:

    A pointer to the range over which the transformation is applied. NULL causes the whole string to be transformed. On return, range is modified to reflect the new range corresponding to the original range.

  • transform:

    A CFString object that identifies the transformation to apply. For a list of valid values, see Transform Identifiers For Cfstringtransform. In macOS 10.4 and later, you can also use any valid ICU transform ID defined in the General.

  • reverse:

    A Boolean that, if true, specifies that the inverse transform should be used (if it exists).

Return Value

true if the transform is successful; otherwise false.

Discussion

The transformation represented by transform is applied to the given range of string, modifying it in place. Only the specified range is modified, but the transform may look at portions of the string outside that range for context. Reasons that the transform may be unsuccessful include an invalid transform identifier, and attempting to reverse an irreversible transform.

See Also

CFMutableString Miscellaneous Functions