String

extension String: DataConvertible
  • Creates a new instance with the specified data.

    If there is non string value of the type that corresponds with the specified data, this initializer returns nil.

    Declaration

    Swift

    init?(data: Data)

    Parameters

    data

    The data to use for the new instance.

  • A byte buffer in memory.

    Declaration

    Swift

    var data: Data { get }