char *strip(int len, char *s) { int i; for (i = len; i; i--) { if (!isspace(s[i])) { s[i + 1] = '\0'; break; } } return s; }