---
title: "CFStringGetFastestEncoding(_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfstringgetfastestencoding(_:)"
---

# CFStringGetFastestEncoding(_:)

Returns for a CFString object the character encoding that requires the least conversion time.

## Declaration

```swift
func CFStringGetFastestEncoding(_ theString: CFString!) -> CFStringEncoding
```

## Parameters

- `theString`: The string for which to determine the fastest encoding.

## Return Value

Return Value The string encoding to which theString can be converted the fastest.

## See Also

### Working With Encodings

- [CFStringConvertEncodingToIANACharSetName(_:)](corefoundation/cfstringconvertencodingtoianacharsetname(_:).md)
- [CFStringConvertEncodingToNSStringEncoding(_:)](corefoundation/cfstringconvertencodingtonsstringencoding(_:).md)
- [CFStringConvertEncodingToWindowsCodepage(_:)](corefoundation/cfstringconvertencodingtowindowscodepage(_:).md)
- [CFStringConvertIANACharSetNameToEncoding(_:)](corefoundation/cfstringconvertianacharsetnametoencoding(_:).md)
- [CFStringConvertNSStringEncodingToEncoding(_:)](corefoundation/cfstringconvertnsstringencodingtoencoding(_:).md)
- [CFStringConvertWindowsCodepageToEncoding(_:)](corefoundation/cfstringconvertwindowscodepagetoencoding(_:).md)
- [CFStringGetListOfAvailableEncodings()](corefoundation/cfstringgetlistofavailableencodings().md)
- [CFStringGetMaximumSizeForEncoding(_:_:)](corefoundation/cfstringgetmaximumsizeforencoding(_:_:).md)
- [CFStringGetMostCompatibleMacStringEncoding(_:)](corefoundation/cfstringgetmostcompatiblemacstringencoding(_:).md)
- [CFStringGetNameOfEncoding(_:)](corefoundation/cfstringgetnameofencoding(_:).md)
- [CFStringGetSmallestEncoding(_:)](corefoundation/cfstringgetsmallestencoding(_:).md)
- [CFStringGetSystemEncoding()](corefoundation/cfstringgetsystemencoding().md)
- [CFStringIsEncodingAvailable(_:)](corefoundation/cfstringisencodingavailable(_:).md)
