Buffer to duplicate.
Memorysafety: This function copies data out of the string into a new memory allocation; as such it has to be freed. It is otherwise safe, in that it won't modify the original memory provided.
Duplicated slice, must be freed with nu_resize
Creates a shallow duplicate of the given buffer.