I’m seeking a library, or bit of code I can incorporate into a Cocoa project where I can turn a stream of text with ansi color control codes into an attributed string. There are many projects that do this, but having examined their code they’re either messy or overly complex. Has anyone an idea of a simple piece of code, or library, or framework I can use to do this simple task?
Share
I’ve written a class (called ANSIEscapeHelper) to translate between
NSStringsthat contain ANSI escape sequences and similarly formattedNSAttributedStrings. It’s released under the MIT License.