CFStringGetSmallestEncoding(_:)
Returns the smallest encoding on the current system for the character contents of a string.
Declaration
func CFStringGetSmallestEncoding(_ theString: CFString!) -> CFStringEncodingParameters
- theString:
The string for which to find the smallest encoding.
Return Value
The string encoding that has the smallest representation of theString.
Discussion
This function returns the supported encoding that requires the least space (in terms of bytes needed to represent one character) to represent the character contents of a string. This information is not always immediately available, so this function might need to compute it.
See Also
Working With Encodings
CFStringConvertEncodingToIANACharSetName(_:)CFStringConvertEncodingToNSStringEncoding(_:)CFStringConvertEncodingToWindowsCodepage(_:)CFStringConvertIANACharSetNameToEncoding(_:)CFStringConvertNSStringEncodingToEncoding(_:)CFStringConvertWindowsCodepageToEncoding(_:)CFStringGetFastestEncoding(_:)CFStringGetListOfAvailableEncodings()CFStringGetMaximumSizeForEncoding(_:_:)CFStringGetMostCompatibleMacStringEncoding(_:)CFStringGetNameOfEncoding(_:)CFStringGetSystemEncoding()CFStringIsEncodingAvailable(_:)