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 output(_:newLine:) for more information.
Topics
Initializers
init(arrayLiteral:)SeeExpressibleByArrayLiteral.init(fragments:)Creates a newConsoleText.init(stringLiteral:)SeeExpressibleByStringLiteral.
Instance Properties
descriptionSeeCustomStringConvertible.endIndexSeeCollection.fragmentsOne or moreConsoleTextFragments making up thisConsoleText.startIndexSeeCollection.
Instance Methods
index(after:)SeeCollection.
Subscripts
subscript(_:)SeeCollection.
Type Properties
newLine\ncharacter with plain styling.
Default Implementations
Relationships
Conforms To
Swift.BidirectionalCollectionSwift.CollectionSwift.CopyableSwift.CustomStringConvertibleSwift.EscapableSwift.ExpressibleByArrayLiteralSwift.ExpressibleByExtendedGraphemeClusterLiteralSwift.ExpressibleByStringInterpolationSwift.ExpressibleByStringLiteralSwift.ExpressibleByUnicodeScalarLiteralSwift.RandomAccessCollectionSwift.SendableSwift.SendableMetatypeSwift.Sequence
See Also
Terminal
ConsoleProtocol for powering styled Console I/O.TerminalGeneric console that uses a mixture of Swift and C standard libraries to fulfill protocol requirements.ConsoleColorSupported colors for creating aConsoleStyleforConsoleText.ConsoleStyleRepresentation of a style for outputting to a Console in different colors with differing attributes. A few suggested default styles are provided.ConsoleClearSupported methods for clearing theConsole.ConsoleTextFragment+(_:_:)Appends aConsoleTextto anotherConsoleText.+=(_:_:)Appends aConsoleTextto anotherConsoleTextin-place.StringProtocol