January 19th 2020
Replace a range of text with a specific string
the standard custom layer context pointer
the id of the buffer to modify
the range of bytes to replace - the range is left inclusive right exclusive, for example the range [10,20) replaces ten bytes and the byte at index 20 remains in the buffer, possibly shifted if the string is not ten bytes
the new text to be placed in the given range
non-zero on success, when the buffer eixsts and the range is contained within the buffer, zero otherwise
This operation is used to implement inserts by setting the range to be empty, [x,x) inserts the string at x, and it implements deletion by setting the string to be empty.
All modifications made by this call are simultaneously saved onto the buffer's history if is enabled.