从字符串中删除指定的字符串,
如"Battle of the Vowels: Hawaii VS Grozny"
删除 "aeiou"
则 最终为 "Bttl f th Vwls: Hw Vs Grzny"
void RemoveChars(char str[], char remove[])
{
int src, dst, removeArray[256];
for(src=0; src<256, src++)
removeArray[src] = 0;
src =0;
while(remove[src])
{
removeArray[remove[src]]=1;
src++;
}
src=dst=0;
do
{
if(!removeArray[str[src]])
str[dst++]=str[src];
}while(str[src++]);
}