Q:

Objective-C Remove ANSI Color Control Codes

I'm building an iOS application that communicates with a remote server. In this case, I'm executing commands using SSH, however, the response coming back from the server is coming in the form of what appears to be hexadecimal. My delegate function for handling responses from a remote server takes the response argument as an NSString, however, this is the content of the string returned (command executed was "ls /" )
ls /\r\n\x1b[0m\x1b[01;34mbin\x1b[0m    \x1b[01;34mdev\x1b[0m   \x1b[01;36minitrd.img\x1b[0m            \x1b[01;34mlib64\x1b[0m       \x1b[01;34mmnt\x1b[0m   \x1b[01;34mroot\x1b[0m  \x1b[01;34msrv\x1b[0m  \x1b[01;34musr\x1b[0m\r\n\x1b[01;34mboot\x1b[0m   \x1b[01;34metc\x1b[0m   \x1b[01;36minitrd.img.old\x1b[0m  \x1b[01;34mlost+found\x1b[0m  \x1b[01;34mopt\x1b[0m   \x1b[01;34mrun\x1b[0m   \x1b[01;34msys\x1b[0m  \x1b[01;34mvar\x1b[0m\r\n\x1b[01;34mcdrom\x1b[0m  \x1b[01;34mhome\x1b[0m  \x1b[01;34mlib\x1b[0m             \x1b[01;34mmedia\x1b[0m       \x1b[01;34mproc\x1b[0m  \x1b[01;34msbin\x1b[0m  \x1b[30;42mtmp\x1b[0m  \x1b[01;36mvmlinuz\x1b[0m'

If this is in fact hexadecimal, how to I convert this back to a readable string for display purposes? If it's not hexadecimal, does anyone know what it is? 
EDIT:
Since this is ANSI Color Control Codes, what's the best method to remove them?

A:

prepend "\" to the beginning of the command
$ \ls

or provide handling for the escape sequences (strip, display)

