d4228428913bd26a1031a2acc156a0b0d777ea45 kent Mon Jun 26 08:11:31 2017 -0700 Improving comments in csv.h. Make eraseTrailingSpaces keep track of number of spaces erased, and using this to keep a dyString->stringSize accurate. diff --git src/inc/common.h src/inc/common.h index e5a218c..e54c5e0 100644 --- src/inc/common.h +++ src/inc/common.h @@ -973,32 +973,33 @@ #define chopCommas(string, words) chopByChar(string, ',', words, ArraySize(words)) /* Chop string by commas. */ char *skipBeyondDelimit(char *s,char delimit); /* Returns NULL or pointer to first char beyond one (or more contiguous) delimit char. If delimit is ' ' then skips beyond first patch of whitespace. */ char *skipLeadingSpaces(char *s); /* Return first white space or NULL if none.. */ char *skipToSpaces(char *s); /* Return first white space. */ -void eraseTrailingSpaces(char *s); -/* Replace trailing white space with zeroes. */ +int eraseTrailingSpaces(char *s); +/* Replace trailing white space with zeroes. Returns number of + * spaces erased. */ void eraseWhiteSpace(char *s); /* Remove white space from a string */ void eraseNonDigits(char *s); /* Remove any chars leaving digits only */ void eraseNonAlphaNum(char *s); /* Remove non-alphanumeric chars from string */ char *trimSpaces(char *s); /* Remove leading and trailing white space. */ void repeatCharOut(FILE *f, char c, int count); /* Write character to file repeatedly. */