I have read a few lines of text into an array of C-strings. The lines have an arbitrary number of tab or space-delimited columns, and I am trying to figure out how to remove
char* trimwhitespace(char *str_base) { char* buffer = str_base; while((buffer = strchr(str_base, ' '))) { strcpy(buffer, buffer+1); } return str_base; }