diff options
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/util_str.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index 5a08f7bc2c..1e1108132c 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -2615,6 +2615,23 @@ char *talloc_asprintf_strupper_m(TALLOC_CTX *t, const char *fmt, ...) return ret; } +char *talloc_asprintf_strlower_m(TALLOC_CTX *t, const char *fmt, ...) +{ + va_list ap; + char *ret; + + va_start(ap, fmt); + ret = talloc_vasprintf(t, fmt, ap); + va_end(ap); + + if (ret == NULL) { + return NULL; + } + strlower_m(ret); + return ret; +} + + /* Returns the substring from src between the first occurrence of the char "front" and the first occurence of the char "back". |