Type Method

localizedName(of:)

Returns a human-readable string giving the name of a given encoding.

Declaration

class func localizedName(of encoding: UInt) -> String

Parameters

encoding

A string encoding. For possible values, see NSStringEncoding.

Return Value

A human-readable string giving the name of encoding in the current locale.

See Also

Working with Encodings

class var availableStringEncodings: UnsafePointer<UInt>

Returns a zero-terminated list of the encodings string objects support in the application’s environment.

class var defaultCStringEncoding: UInt

Returns the C-string encoding assumed for any method accepting a C string as an argument.

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)

Returns an NSData object containing a representation of the receiver encoded using a given encoding.

func data(using: UInt, allowLossyConversion: Bool)

Returns an NSData object containing a representation of the receiver encoded using a given encoding.

var description: String

This NSString object.

var fastestEncoding: UInt

The fastest encoding to which the receiver may be converted without loss of information.

var smallestEncoding: UInt

The smallest encoding to which the receiver can be converted without loss of information.