<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFStringGetFastestEncoding(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@F@CFStringGetFastestEncoding"
  },
  "title" : "CFStringGetFastestEncoding(_:)"
}
-->

# CFStringGetFastestEncoding(_:)

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

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

## Parameters

`theString`

The string for which to determine the fastest encoding.

## Return Value

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

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)