void ltrim(char s)
{
char *p;
p = s;
while(p == ‘ ‘ || p == ‘t’){p++;}
strcpy(s,p);
}
void rtrim(char *s)
{
int i;
if (s == NULL)
return;
i = strlen(s)-1;
while((s[i] == ‘ ‘ || s[i] == ‘t’) && i >= 0){i–;};
s[i+1] = ‘ ’;
}
void trim(char *s){
ltrim(s);
rtrim(s);
}