---
title: "CFStringTransform(_:_:_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfstringtransform(_:_:_:_:)"
---

# CFStringTransform(_:_:_:_:)

Perform in-place transliteration on a mutable string.

## Declaration

```swift
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 doc://com.apple.corefoundation/documentation/CoreFoundation/transform-identifiers-for-cfstringtransform. In macOS 10.4 and later, you can also use any valid ICU transform ID defined in the https://unicode-org.github.io/icu/userguide/transforms/general/.
- `reverse`: A Boolean that, if true, specifies that the inverse transform should be used (if it exists).

## Return Value

Return Value true if the transform is successful; otherwise false.

## Discussion

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

- [CFStringAppend(_:_:)](corefoundation/cfstringappend(_:_:).md)
- [CFStringAppendCharacters(_:_:_:)](corefoundation/cfstringappendcharacters(_:_:_:).md)
- [CFStringAppendCString(_:_:_:)](corefoundation/cfstringappendcstring(_:_:_:).md)
- [CFStringAppendFormatAndArguments(_:_:_:_:)](corefoundation/cfstringappendformatandarguments(_:_:_:_:).md)
- [CFStringAppendPascalString(_:_:_:)](corefoundation/cfstringappendpascalstring(_:_:_:).md)
- [CFStringCapitalize(_:_:)](corefoundation/cfstringcapitalize(_:_:).md)
- [CFStringCreateMutable(_:_:)](corefoundation/cfstringcreatemutable(_:_:).md)
- [CFStringCreateMutableCopy(_:_:_:)](corefoundation/cfstringcreatemutablecopy(_:_:_:).md)
- [CFStringCreateMutableWithExternalCharactersNoCopy(_:_:_:_:_:)](corefoundation/cfstringcreatemutablewithexternalcharactersnocopy(_:_:_:_:_:).md)
- [CFStringDelete(_:_:)](corefoundation/cfstringdelete(_:_:).md)
- [CFStringFindAndReplace(_:_:_:_:_:)](corefoundation/cfstringfindandreplace(_:_:_:_:_:).md)
- [CFStringFold(_:_:_:)](corefoundation/cfstringfold(_:_:_:).md)
- [CFStringInsert(_:_:_:)](corefoundation/cfstringinsert(_:_:_:).md)
- [CFStringLowercase(_:_:)](corefoundation/cfstringlowercase(_:_:).md)
- [CFStringNormalize(_:_:)](corefoundation/cfstringnormalize(_:_:).md)
