f7086ca9f432d2f720809669557aa76831bf8ad5 tdreszer Wed Nov 23 14:54:25 2011 -0800 New calculation for squeezed label height diff --git src/inc/common.h src/inc/common.h index 4bc486c..518ae17 100644 --- src/inc/common.h +++ src/inc/common.h @@ -844,30 +844,33 @@ #define subChar(s,old,new) (void)memSwapChar((s),strlen(s),(old),(new)) /* Substitute newChar for oldChar throughout string s. */ void stripChar(char *s, char c); /* Remove all occurences of c from s. */ char *stripEnclosingChar(char *inout,char encloser); // Removes enclosing char if found at both beg and end, preserving pointer // Note: handles brackets '(','{' and '[' by complement at end #define stripEnclosingDoubleQuotes(inout) stripEnclosingChar((inout),'"') #define stripEnclosingSingleQuotes(inout) stripEnclosingChar((inout),'\'') void stripString(char *s, char *strip); /* Remove all occurences of strip from s. */ +int countCase(char *s,boolean upper); +// Count letters with case (upper or lower) + int countChars(char *s, char c); /* Return number of characters c in string s. */ int countCharsN(char *s, char c, int size); /* Return number of characters c in string s of given size. */ int countLeadingChars(char *s, char c); /* Count number of characters c at start of string. */ int countLeadingDigits(const char *s); /* Return number of leading digits in s */ int countLeadingNondigits(const char *s); /* Count number of leading non-digit characters in s. */