







i search in google to find the solution remove repeat char from a string, but failed. so write it by myselft....
i use C.
char * RemoveRepeatChar(char *S){
char *temp=S, *move;
//1. base ==Null
if(*s) return null;
while(*S){
temp = s+1;
while(*temp){
//repeat char
if(*temp == *S)
{
move = temp;
while(*move)
*move++=*(move+1);
}
else
temp++;
}
S++;
}
}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。