diff options
Diffstat (limited to 'str.c')
-rw-r--r-- | str.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -257,6 +257,15 @@ cleanup: return result; } +void +str_clear(ld_string_t *dest) +{ + REQUIRE(dest != NULL); + + if (dest->allocated) + dest->data[0] = '\0'; +} + /* * Initialize string from char *. */ |