Documentation Language: Swift

Method

write(_:indent:)

Writes text to the current writer.

@MainActor func write(_ text: String, indent: Bool = true) async

Parameters

text

The text to write

indent

Whether to apply indentation if at line start (default: true)

Discussion

The text is written to whichever writer is currently on top of the writer stack (either the main output or a file writer).