The fastest encoding to which the receiver may be converted without loss of information.
- iOS 2.0+
- macOS 10.0+
- tvOS 9.0+
- watchOS 2.0+
“Fastest” applies to retrieval of characters from the string. This encoding may not be space efficient.
Working with Encodings
func canBeConverted(to: UInt)
Returns a Boolean value that indicates whether the receiver can be converted to a given encoding without loss of information.
func data(using: UInt)
NSData object containing a representation of the receiver encoded using a given encoding.