X-Git-Url: https://rtime.felk.cvut.cz/gitweb/notmuch.git/blobdiff_plain/3fed6736a7ef8b8b1f05d0fabb136bdd3b5917ee..694c7b9ba7c83eba10105f0f151884dcdb90426d:/util/string-util.c diff --git a/util/string-util.c b/util/string-util.c index 3e7066cd..a90501ee 100644 --- a/util/string-util.c +++ b/util/string-util.c @@ -37,6 +37,14 @@ strtok_len (char *s, const char *delim, size_t *len) return *len ? s : NULL; } +const char * +strtok_len_c (const char *s, const char *delim, size_t *len) +{ + /* strtok_len is already const-safe, but we can't express both + * versions in the C type system. */ + return strtok_len ((char*)s, delim, len); +} + char * sanitize_string (const void *ctx, const char *str) {