Extended Protocol
StringProtocol
extension StringProtocol
Topics
Instance Methods
func consoleStylized(ConsoleStyle) -> StringWraps a string in the ANSI codes indicated by theConsoleStylespecification.func consoleStylized(color: ConsoleColor?, background: ConsoleColor?, isBold: Bool) -> StringWraps a string in the ANSI codes indicated by the style specification.func consoleText(ConsoleStyle) -> ConsoleTextConverts thisStringtoConsoleText.func consoleText(color: ConsoleColor?, background: ConsoleColor?, isBold: Bool) -> ConsoleTextConverts thisStringtoConsoleText.
See Also
Terminal
protocol ConsoleProtocol for powering styled Console I/O.class TerminalGeneric console that uses a mixture of Swift and C standard libraries to fulfill protocol requirements.enum ConsoleColorSupported colors for creating aConsoleStyleforConsoleText.struct ConsoleStyleRepresentation of a style for outputting to a Console in different colors with differing attributes. A few suggested default styles are provided.enum ConsoleClearSupported methods for clearing theConsole.struct ConsoleTextA collection ofConsoleTextFragments. Represents stylized text that can be outputted to aConsole.struct ConsoleTextFragmentfunc + (ConsoleText, ConsoleText) -> ConsoleTextAppends aConsoleTextto anotherConsoleText.func += (inout ConsoleText, ConsoleText)Appends aConsoleTextto anotherConsoleTextin-place.