diff options
| author | Jake Koroman <jake@jakekoroman.com> | 2026-04-28 16:30:44 -0400 |
|---|---|---|
| committer | Jake Koroman <jake@jakekoroman.com> | 2026-04-28 16:30:44 -0400 |
| commit | c4fc5c1f22c91d38dacc3fb25a3624e2896a8acd (patch) | |
| tree | 3db7f3797938967cad564f51edc6d31c2572d105 /jrk.h | |
| parent | 250c8fa41bdae8988f410cf9fe8106bf1e8017ee (diff) | |
jrk_string_from_lit: remove call to jrk_string_from_parts() to allow comptime constructionHEADmaster
Diffstat (limited to 'jrk.h')
| -rw-r--r-- | jrk.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -95,7 +95,7 @@ jrk_String jrk_string_trim(jrk_String); typedef jrk_String(*jrk_string_trim_fn_t) (jrk_String); jrk_String jrk_string_trim_fn(jrk_String, jrk_string_trim_fn_t); jrk_String jrk_string_from_cstr(const char*); -#define jrk_string_from_lit(str_lit) jrk_string_from_parts((str_lit), sizeof((str_lit)) - 1) +#define jrk_string_from_lit(str_lit) (jrk_String) { .data = (str_lit), .len = sizeof((str_lit)) - 1 } jrk_String jrk_string_chop_by_delim(jrk_String*, char delim); jrk_String jrk_string_chop_by_space(jrk_String*); bool jrk_string_equals(jrk_String, jrk_String); /* takes the lowest len and matches up to that size */ |
