8be2a5d14b01e092a92db5b926ac4963d6882287 tdreszer Fri Apr 15 16:58:58 2011 -0700 Added routine to find the last non-whitespace char in a string diff --git src/inc/common.h src/inc/common.h index 41e03c5..0d625b3 100644 --- src/inc/common.h +++ src/inc/common.h @@ -767,30 +767,33 @@ char *stringBetween(char *start, char *end, char *haystack); /* Return string between start and end strings, or NULL if * none found. The first such instance is returned. * String must be freed by caller. */ char * findWordByDelimiter(char *word,char delimit, char *line); /* Return pointer to first word in line matching 'word' and delimited by 'delimit'. Comparison is case sensitive. Delimit of ' ' uses isspace() */ boolean endsWith(char *string, char *end); /* Returns TRUE if string ends with end. */ char lastChar(char *s); /* Return last character in string. */ +char *lastNonWhitespaceChar(char *s); +// Return pointer to last character in string that is not whitespace. + char *matchingCharBeforeInLimits(char *limit, char *s, char c); /* Look for character c sometime before s, but going no further than limit. * Return NULL if not found. */ boolean wildMatch(const char *wildCard, const char *string); /* does a case insensitive wild card match with a string. * * matches any string or no character. * ? matches any single character. * anything else etc must match the character exactly. */ boolean sqlMatchLike(char *wildCard, char *string); /* Match using % and _ wildcards. */ boolean anyWild(const char *string); /* Return TRUE if any wild card characters in string. */