Skip to content

metatronsw/SwTerminal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Swift Terminal extension

It's a simple and powerful addition to the String structure, making it easy to control the Terminal. You can color the letters, the background, move the cursor, clear the screen.

A collection of many useful functions you can use with the terminal. It is important to note that the XCode console is not a real terminal, so it cannot display coloured letters or move the cursor.

Usage:

printty(.colorBg(.red), .colorFg(.green), "Colored text", .fontReset)
 let (row,col) = terminalSize()
 
 printty(.clearScreen)
 printty(.cursor(row: row, col: col-3), "End")
print("Tic-Tac".termBlink)

About

Swift terminal extensions and utils

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages