diff options
Diffstat (limited to 'qstd/str.c')
-rw-r--r-- | qstd/str.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -58,3 +58,9 @@ char* dup_string(Arena* a, const char* s) { return d; } +char* dup_stringh(struct Heap* h, const char* s) { + int size = string_len(s) + 1; + char* d = heap_alloc_aligned(h, size, 1); + string_copy(d, s); + return d; +} |