Contents

stringRepresentation(encoding:)

Converts the SSID’s raw data to a string representation using the specified encoding.

Declaration

func stringRepresentation(encoding: String.Encoding = .utf8) -> String?

Parameters

  • encoding:

    The text encoding to use for conversion. Defaults to UTF-8.

Return Value

A string representation of the SSID, or nil if the raw data can’t be converted using the specified encoding.

Discussion

Use this method to obtain a human-readable version of the network name. Because SSIDs don’t have a standardized text encoding, the conversion may fail if the raw data can’t be represented as text in the specified encoding.

See Also

Working with SSIDs as a string