The whole text as a new string, made with allocator. Free it unless the allocator is temporary.
buffer: Text_Buffer;
defer free_buffer(*buffer);
set_text(*buffer, "abc");
insert(*buffer, 3, "def");
assert(buffer_to_string(*buffer, temp) == "abcdef");buffer_to_string :: (
buffer: *Text_Buffer,
allocator: Allocator = context.allocator
) -> string
Parameters
- buffer: *Text_Buffer
- allocator: Allocator = context.allocator
Returns
- string