Protocol

LosslessStringConvertible

A type that can be represented as a string in a lossless, unambiguous way.

Declaration

protocol LosslessStringConvertible

Overview

For example, the integer value 1050 can be represented in its entirety as the string “1050”.

The description property of a conforming type must be a value-preserving representation of the original value. As such, it should be possible to re-create an instance from its string representation.

Topics

Initializers

init?(String)

Instantiates an instance of the conforming type from a string representation.

Required.

See Also

String Representation

protocol CustomStringConvertible

A type with a customized textual representation.

protocol CustomDebugStringConvertible

A type with a customized textual representation suitable for debugging purposes.