diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-07-31 18:01:37 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-07-31 18:01:37 +0000 |
commit | ea0f5ec8adab0c268895d416c94b3f648c81ef31 (patch) | |
tree | 0542baa92cc22cdcb59a850a982dcc49d6f6537d /src/common/util.c | |
parent | d934607069c77d6cf4caf9061e43d6d20c5aa111 (diff) | |
download | tor-ea0f5ec8adab0c268895d416c94b3f648c81ef31.tar tor-ea0f5ec8adab0c268895d416c94b3f648c81ef31.tar.gz |
r6980@Kushana: nickm | 2006-07-31 13:18:22 -0400
Add a utility function to verify that a string has been through strlower.
svn:r6959
Diffstat (limited to 'src/common/util.c')
-rw-r--r-- | src/common/util.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/common/util.c b/src/common/util.c index 98d6867bc..82ebfaf0b 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -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. */ |