aboutsummaryrefslogtreecommitdiffhomepage
path: root/util/string-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/string-util.c')
-rw-r--r--util/string-util.c8
1 files changed, 8 insertions, 0 deletions
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)
{