char *trim_befor_after20 (char *str)
{
char *tmp;
char *tmp1;
tmp=str;
tmp1=str;
if(*str==0x00)
return(tmp1);
while ((unsigned char)*str>0x00 && (unsigned char)*str<=0x20) { str++; }
while ((unsigned char)*str!='\0')
{
if((unsigned char)*str>0x00 && (unsigned char)*str<0x20)
{
str++;
}
else
{
*tmp=*str; str++; tmp++;
}
}
str=tmp;
str--;
while ((unsigned char)*str>0x00 && (unsigned char)*str<=0x20) { str--; }
str++;
*str='\0';
return tmp1;
}
阅读(1105) | 评论(0) | 转发(0) |