char *trim (char *str)
{
char *tmp;
char *tmp1;
tmp=str;
tmp1=str;
if(*str==0x00)
return(tmp1);
while (*str==0x20) str++;
while (*str!='\0'){ *tmp=*str; str++; tmp++; }
str=tmp;
str--;
while (*str==0x20) str--;
str++;
*str='\0';
return tmp1;
}
阅读(716) | 评论(0) | 转发(0) |