mirror of
https://github.com/helix-editor/helix.git
synced 2025-04-04 11:27:46 +03:00
These functions mimic `str::floor_char_boundary` and `str::floor_char_boundary` (currently unstable under `round_char_boundary`). They're useful for correcting a byte index which may not lie on a character boundary. For example you might limit a search within a slice to some fixed number of bytes. The fixed number might not lie on a boundary though so it needs to be corrected to either the earlier (floor) or later (ceil) boundary. |
||
---|---|---|
.. | ||
src | ||
tests | ||
Cargo.toml |