You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

22 lines
344 B

void remove_trailing_white( char * c ) {
int index, i;
index = -1;
i = 0;
while( c[i] != '\0')
{
if (c[i] == '\n') {
c[i + 1] = '\0';
return;
}
if(c[i] != ' ' && c[i] != '\t')
{
index= i;
}
i++;
}
c[index + 1] = '\0';
}