Data

extension Data
  • Returns a String containing a representation of the Data.

    Declaration

    Swift

    @inlinable
    public func getString(using encoding: String.Encoding) -> String?

    Parameters

    encoding

    Required. Encoding used for transformation.

  • Returns a String containing a representation of the Data decoded using UTF-8.

    Declaration

    Swift

    @inlinable
    public var utf8String: String? { get }
  • Returns a String containing a representation of the Data decoded using UTF-16.

    Declaration

    Swift

    @inlinable
    public var utf16String: String? { get }