I have a C tokenizer library I'm using for a personal project.
It returns escaped characters as a char array of literals. So for example the string "\n" gets returned as this char array:
Instead of this (desired) array:
Is there an easy way in C to convert the first char array into the second char array without manual parsing?
Here is code example of what I'm after:
test = '\\';
test = 'n';
char c = someFunction(test)
printf("A %c B", c);
Is there a way to do this using any obscure tricks or do I need to roll my own function?