Frees a slice allocated with mallocSlice.
Duplicates a slice with malloc. Equivalent to .dup Has to be cleaned-up with free(slice.ptr) or freeSlice(slice).
Duplicates a slice with malloc. Equivalent to .idup Has to be cleaned-up with free(slice.ptr) or freeSlice(slice).
Allocates a slice with malloc.
Allocates a slice with malloc, but does not initialize the content.
Duplicates a zero-terminated string with malloc, return a char[]. Equivalent to .dup Has to be cleaned-up with free(s.ptr). Note: The zero-terminating byte is preserved. This allow to have a string which also can be converted to a C string with .ptr. However the zero byte is not included in slice length.
Duplicates a zero-terminated string with malloc, return a string. Equivalent to .idup Has to be cleaned-up with free(s.ptr). Note: The zero-terminating byte is preserved. This allow to have a string which also can be converted to a C string with .ptr. However the zero byte is not included in slice length.