The function prototype would be:
string f (string s);
or
char* f (char* s);
f would transform a string represented by printable ascii char into a raw string.
and it would behaves as in the following examples:
f("AAA") = "AAA"
f("AA\n") = "AA+line_feed"
i.e the input string is 4 char long (+ NULL), the output is 3 char long(+NULL). The 2 printable characters '\' 'n' (the 2 last characters of the input string) are replaced by one single LF character (ascii 10)
f("\0x007")
returns a string of length 1 containing char ascii 7
f("AA\nAA\tAA\07\n")
would convert all these escape character stuff to their real (1 char per escape sequence) equivalent.
This must exist as at least the C compiler/C preprocessor does it.
/C