分析:还是上一篇 hash_map应用
void delchar(char str[],char del[])
{
int hashmap[256]={0};
char *pDel=del;
//hash统计
while (*pDel!='\0') {
hashmap[*pDel]=1;
pDel++;
}
char *pHead=str;
int count=0;
//扫描
while (*pHead!='\0') {
if (hashmap[*pHead]==0) {
str[count]=*pHead;
count++;
}
pHead++;
}
str[count]='\0';
}