What would you use to check for escape sequenced values? I have two inputs arg1 and arg2. If you enter ab\t xyz into the arguments. And then if you were to type in "ab\t" into the input you would get "xyz" as output. I hope this makes sense and im really stuck at the escape character handling. Currently the code works for all except for when there are escape chars or if one argument is longer than the other.
it is a c code we wrote on our own the plan is to make a custom tr() function
void tr_str(char s[], char news[]){
int c;
size_t k =0;
while ((c = getchar()) != EOF)
{
for(k=0; k < strlen(s);k++)
{
if(c == s[k])
{
c = news[k];
}
}
putchar(c);
}
}