init(contentsOf:usedEncoding:)
Returns an @c NSString object initialized by reading data from a given URL and returns by reference the encoding used to interpret the data.
Declaration
convenience init(contentsOf url: URL, usedEncoding enc: UnsafeMutablePointer<UInt>?) throwsParameters
- url:
The URL to read.
- enc:
Upon return, if the URL is read successfully, contains the encoding used to interpret the file at @c url.
Return Value
An @c NSString object initialized by reading data from @c url. Returns @c nil if the URL can’t be opened or there is an encoding error.