deleteText
Deletes a sequence of characters.
The characters that are deleted are those characters at positions from @start_pos up to, but not including @end_pos. If @end_pos is negative, then the characters deleted are those from @start_pos to the end of the text.
Note that the positions are specified in characters, not bytes.
Parameters
startPos
start position
endPos
end position