Structure
ConsoleText
A collection of
ConsoleTextFragments. Represents stylized text that can be outputted to a Console.struct ConsoleText
Overview
let text: ConsoleText = "Hello, " + "world".consoleText(color: .green)
See Console.output(_:newLine:) for more information.
Topics
Initializers
init(arrayLiteral: ConsoleTextFragment...)SeeExpressibleByArrayLiteral.init(fragments: [ConsoleTextFragment])Creates a newConsoleText.init(stringLiteral: String)SeeExpressibleByStringLiteral.
Instance Properties
var description: StringSeeCustomStringConvertible.var endIndex: IntSeeCollection.var fragments: [ConsoleTextFragment]One or moreConsoleTextFragments making up this `ConsoleText.var startIndex: IntSeeCollection.
Instance Methods
func index(after: Int) -> IntSeeCollection.
Subscripts
subscript(Int) -> ConsoleTextFragmentSeeCollection.
Type Properties
static let newLine: ConsoleText\ncharacter with plain styling.
Default Implementations
Relationships
Conforms To
Swift.BidirectionalCollectionSwift.CollectionSwift.CopyableSwift.CustomStringConvertibleSwift.EscapableSwift.ExpressibleByArrayLiteralSwift.ExpressibleByExtendedGraphemeClusterLiteralSwift.ExpressibleByStringInterpolationSwift.ExpressibleByStringLiteralSwift.ExpressibleByUnicodeScalarLiteralSwift.RandomAccessCollectionSwift.SendableSwift.SendableMetatypeSwift.Sequence