aboutsummaryrefslogtreecommitdiffstats
path: root/util/strgutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/strgutil.c')
-rw-r--r--util/strgutil.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/util/strgutil.c b/util/strgutil.c
index 620fb33bc..3d4540502 100644
--- a/util/strgutil.c
+++ b/util/strgutil.c
@@ -1297,6 +1297,18 @@ ascii_memcasecmp( const char *a, const char *b, size_t n )
return 0;
}
+/* Lowercase all ASCII characters in S. */
+char *
+ascii_strlwr (char *s)
+{
+ char *p;
+
+ for (p = s; *p; p++ )
+ if (isascii (*p) && *p >= 'A' && *p <= 'Z')
+ *p |= 0x20;
+
+ return s;
+}
/*********************************************