A source of text-streaming operations.
SDK
- Xcode 8.0+
Framework
- Swift Standard Library
Declaration
Overview
Instances of types that conform to the Text
protocol can write their value to instances of any type that conforms to the Text
protocol. The Swift standard library’s text-related types, String
, Character
, and Unicode
, all conform to Text
.
Conforming to the TextOutputStreamable Protocol
To add Text
conformance to a custom type, implement the required write(to:)
method. Call the given output stream’s write(_:)
method in your implementation.