Loading src/common/util.c +13 −0 Original line number Diff line number Diff line Loading @@ -337,6 +337,19 @@ tor_strisprint(const char *s) return 1; } /** Return 1 if no character in <b>s</b> is uppercase, else return 0. */ int tor_strisnonupper(const char *s) { while (*s) { if (! TOR_ISUPPER(*s)) return 0; s++; } return 1; } /* Compares the first strlen(s2) characters of s1 with s2. Returns as for * strcmp. */ Loading src/common/util.h +1 −0 Original line number Diff line number Diff line Loading @@ -97,6 +97,7 @@ extern int dmalloc_free(const char *file, const int line, void *pnt, void tor_strlower(char *s); void tor_strupper(char *s); int tor_strisprint(const char *s); int tor_strisnonupper(const char *s); int strcmpstart(const char *s1, const char *s2); int strcasecmpstart(const char *s1, const char *s2); int strcmpend(const char *s1, const char *s2); Loading Loading
src/common/util.c +13 −0 Original line number Diff line number Diff line Loading @@ -337,6 +337,19 @@ tor_strisprint(const char *s) return 1; } /** Return 1 if no character in <b>s</b> is uppercase, else return 0. */ int tor_strisnonupper(const char *s) { while (*s) { if (! TOR_ISUPPER(*s)) return 0; s++; } return 1; } /* Compares the first strlen(s2) characters of s1 with s2. Returns as for * strcmp. */ Loading
src/common/util.h +1 −0 Original line number Diff line number Diff line Loading @@ -97,6 +97,7 @@ extern int dmalloc_free(const char *file, const int line, void *pnt, void tor_strlower(char *s); void tor_strupper(char *s); int tor_strisprint(const char *s); int tor_strisnonupper(const char *s); int strcmpstart(const char *s1, const char *s2); int strcasecmpstart(const char *s1, const char *s2); int strcmpend(const char *s1, const char *s2); Loading