Instance Method

base64Encoded​Data(options:​)

Create a Base-64, UTF-8 encoded NSData from the receiver's contents using the given options.

Declaration

func base64EncodedData(options: NSData.Base64EncodingOptions = []) -> Data

Parameters

options

A mask that specifies options for Base-64 encoding the data. Possible values are given in NSData.Base64Encoding​Options.

Return Value

A Base-64, UTF-8 encoded data object.

Discussion

By default, no line endings are inserted.

If you specify one of the line length options (line​Length64Characters or line​Length76Characters) but don’t specify the kind of line ending to insert, the default line ending is Carriage Return + Line Feed.