ANSI library for highlighting in C / Objective-C

I am looking for a library or a bit of code that I can include in a Cocoa project, where I can turn a text flow with ansi color management codes into an attribute string. There are many projects that do this, but after examining their code, they are either dirty or too complex. Does anyone have an idea for a simple piece of code or library or structure that I can use to accomplish this simple task?

+4
source share
2 answers

I wrote a class (called ANSIEscapeHelper ) to translate between NSStrings that contain ANSI escape sequences and similarly formatted NSAttributedStrings . It is released under the MIT license.

+6
source

I am not aware of a library or structure. I would have thought it would not be too difficult to do this - I am new to Cocoa, but I will probably move on to the regexen processing path.

0
source

All Articles