Duplicates a string with malloc, and add a terminal zero. Has to be cleaned-up with free(slice.ptr) or freeSlice(slice).
See Implementation
Duplicates a string with malloc, and add a terminal zero. Has to be cleaned-up with free(slice.ptr) or freeSlice(slice).