diff options
Diffstat (limited to 'common/stringhelp.c')
-rw-r--r-- | common/stringhelp.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/common/stringhelp.c b/common/stringhelp.c index 7128de5fc..42e1bcbbb 100644 --- a/common/stringhelp.c +++ b/common/stringhelp.c @@ -804,6 +804,18 @@ ascii_tolower (int c) return c; } +/* Lowercase all ASCII characters in S. */ +char * +ascii_strlwr (char *s) +{ + char *p = s; + + for (p=s; *p; p++ ) + if (isascii (*p) && *p >= 'A' && *p <= 'Z') + *p |= 0x20; + + return s; +} int ascii_strcasecmp( const char *a, const char *b ) |