summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/misc.c b/misc.c
index 056c84d..0a8ee86 100644
--- a/misc.c
+++ b/misc.c
@@ -62,6 +62,10 @@ static char *cstr(const char *str, size_t len) {
return ret;
}
+static inline char *str_to_cstr(String s) {
+ return cstr(s.str, s.len);
+}
+
static bool str_eq_cstr(String s, const char *str) {
return strncmp(s.str, str, s.len) == 0;
}