Someone
public c v1 · immutable// Remove any spaces from the end of the stringstatic voidremove_trailing_spaces(char *string){ int length; //string length for (length = 0; *string++ != '\0'; length++); int i; i = length; while(*(string+length) == ' '){length--;} i = i - length; *(string+i) = '\0'; }