Expand description
Text movement and boundary calculation primitives.
Enums§
- Char
Kind - Character classification used for word-boundary detection.
Functions§
- classify_
char - Classifies a character into
CharKind. - find_
line_ end - Returns the byte offset of the end of the line containing
cursor_byte, excluding trailing newline characters (\r\nor\n). - find_
line_ range_ at - Returns the byte range of the full line containing
cursor_byte, including any trailing line terminator (\nor\r\n). - find_
line_ start - Returns the byte offset of the beginning of the line containing
cursor_byte. - find_
next_ word_ end - Finds the end offset of the current word or next word moving forward from
cursor_byte. - find_
prev_ word_ start - Finds the start offset of the previous word (or punctuation token) moving backward from
cursor_byte. - find_
word_ range_ at - Finds the byte range of the word, punctuation token, or whitespace run containing
cursor_byte.