here is the function
char * strtrim(char* s )
it's designed to remove any space character(such as '\t' , ' ' ...) in a string
char* strtrim(char* s)
{
int len=0,i=0,j=0,k=0;
len = strlen(s);
if( len == 0 ) return NULL;
j = len -1;
while(s[j] == ' ' || s[i] == '\t' )
{
s[j--] = '\0';
if(j < 0 ) break;
}
while( s[i] == ' ' || s[i] == '\t' ) i++;
if( i == 0 ) return s;
while( s[k] != '\0') s[k++] = s[i++];
return s;
}