replace escaped characters with their true values
#include <suplib/str.h>char *unescape(char *string);
char *string
- the string to unescape
unescape
replaces escaped characters with their true values.
The escape prefix is the character ‘\’. It recognizes the
following special characters: ‘\t’, ‘\n’. All other
escaped characters are replaced by the character (i.e., ‘\g’
is turned into ‘g’). It makes the changes in-place.
It returns a pointer to the original string upon success, NULL
if the escape prefix occurred without a character to escape.
Diab Jerius