Skip to content

oleander/Ansi

Repository files navigation

Ansi Status

Ansi parser written in Swift 3 for constructing NSAttributedStrings. Currently supports 8 & 256 bit colors, italic, strikethrough, underline and bold text.

Usage

import Ansi

let attr = "ABC\\e[3;4;33mDEF\\e[0mGHI".ansified()
attr // => "ABC" + "DEF".italic.underline.yellow + "GHI"
attr.string // => "ABCDEF GHI"

Install

Add pod 'Ansi' to your Podfile and run pod install.

About

Ansi parser written in Swift 3 for constructing NSAttributedStrings

Resources

License

Stars

Watchers

Forks

Packages

No packages published