Skip to content

Instance Method

output(_:style:newLine:)

Outputs a String to the Console with the specified ConsoleStyle style.
func output(_ string: String, style: ConsoleStyle = .plain, newLine: Bool = true)

Parameters

string

String to print.

style

ConsoleStyle to use for the string.

newLine

If true, the next output will be on a new line.

Discussion

console.output("Hello, world!", style: .plain)