Expand description
Unicode utilities for text processing.
Provides helpers for proper Unicode handling including character boundary detection and validation.
Functionsยง
- current_
timestamp - Returns the current Unix timestamp in seconds.
- find_
char_ boundary - Finds a valid UTF-8 character boundary at or before the given position.
- find_
char_ boundary_ forward - Finds a valid UTF-8 character boundary at or after the given position.
- grapheme_
byte_ position - Finds the byte position of the nth grapheme cluster.
- grapheme_
count - Counts the number of grapheme clusters in a string.
- lines_
with_ offsets - Iterates over lines with their byte offsets.
- split_
sentences - Splits text into sentences (approximate).
- truncate_
graphemes - Truncates a string at a grapheme cluster boundary.
- validate_
utf8 - Validates that a byte slice is valid UTF-8.