Do not follow this link

~tobtobxx/textpos

16a5dda7 — TobTobXX 2 years ago
Update to v0.3.3
fadbffa2 — TobTobXX 2 years ago
Add inc(char) method
4fdf8931 — TobTobXX 2 years ago
Update to v0.3.2

clone

read-only
https://git.sr.ht/~tobtobxx/textpos
read/write
git@git.sr.ht:~tobtobxx/textpos

You can also use your local clone with git send-email.

#textpos

A small library to track human-readable text positions

builds.sr.ht status docs.rs status

textpos provides simple types that encapsulate a position in a text. This means that not only the index is tracked, but also the column and line, ie. the graphical position.

#When to use this library

textpos was created to facilitate writing parsers. It allows a human to inspect which region of a text maps to which parser. The library is intended to be used to make this information (which tokens map to which text reange) human-accesible.

#When not to use this library

The types from this library should not be used to pass text ranges around that will need to be interpreted by other parts of the program again. Plain and simple indexes are more precise and easier to use for code working with strings.

Do not follow this link