Given string like: ab \t \nc how can i ignore the white-spaces and to get abc in c?
I know how to skip about really tab and white-space:
if(str[i] == ' ' || str[i] = '\t')
but if I pass string that with \t strictly, so i will get str[i]=\ and str[i+1]=t. So how can I catch these cases?
For example:
char* str = "abcd \n \t ef ";
char* str_clear = filter(str); // need to be "abcdef".
And I asking about how to write the filter function (like that i write above, i know how skip about ' ' and '' , but how can I catch "\n" and "\t"?)