3 ms·
Right. Wouldn't it be smaller to even use UTF-32 and just jump forward and back in 4-byte blocks?
by ClassyJacket 9y ago
Right. Wouldn't it be smaller to even use UTF-32 and just jump forward and back in 4-byte blocks?
- moefh 9y agoYes, a common way to store the text in editors is a gap buffer[1]. It allows efficient text insertion/deletion in one point and doesn't have too much overhead. [1] https://en.wikipedia.org/wiki/Gap_buffer https://en.wikipedia.org/wiki/Gap_buffer