A copy of the bytes from start up to end, made with allocator.
buffer: Text_Buffer;
defer free_buffer(*buffer);
set_text(*buffer, "hello world");
word := copy_range(*buffer, 0, 5, temp);
insert(*buffer, 0, ">> ");
assert(word == "hello");copy_range :: (
buffer: *Text_Buffer,
start: int,
end: int,
allocator: Allocator
) -> string
Parameters
- buffer: *Text_Buffer
- start: int
- end: int
- allocator: Allocator
Returns
- string