diff options
Diffstat (limited to 'strbuf.c')
-rw-r--r-- | strbuf.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -563,3 +563,16 @@ int fprintf_ln(FILE *fp, const char *fmt, ...) return -1; return ret + 1; } + +char *xstrdup_tolower(const char *string) +{ + char *result; + size_t len, i; + + len = strlen(string); + result = xmalloc(len + 1); + for (i = 0; i < len; i++) + result[i] = tolower(string[i]); + result[i] = '\0'; + return result; +} |