这个有用:
#include <stdio.h>
#include <string.h>
int main()
{
char str[] = "abc\tcba\tsdfe\tdfg\tdfg";
char strOut[1024] = {0};
int slen = strlen(str);
for(int i = 0; i < slen; i++)
{
if(str[i] == '\t') sprintf(strOut, "%s****", strOut);
else if(str[i] == 0) break;
else sprintf(strOut, "%s%c", strOut, str[i]);
}
printf("%s\n", strOut);
return 0;
}