> you don't need to return anything... do the string in place: > > [........................ snip .........................] > > void remove_CRs(char *string) > { > register char *ptr; > > ptr = string; > do { > if (*string != '\r') > *ptr++ == *string; ^^ > ++string; > } while(*string); > } > > [......................... snip .........................] > > this does it all, including placing the endmark on the string. it's also > compact and FAST. caveat: untested, but guaranteed to work. :) Really ;) Sorry, could not resist. ;) -reni
This archive was generated by hypermail 2b30 : 12/07/00 PST