Skip to content

Instantly share code, notes, and snippets.

View danlamanna's full-sized avatar
🏠
Working from home

Dan LaManna danlamanna

🏠
Working from home
View GitHub Profile

All these operations are very natural for buffer objects as well as strings, which leads me to the conclusion we should provide two flavours for each function, for buffers and for strings. The way emacs does it is by specifying an object argument. I find this suboptimal, but it is also possible solution (and would reduce the number of functions in half). Note that there are also different indexing conventions, see the Question below.

All functions come in buffer and string flavours. The “current position” is called point in buffer versions and offset in string