Documentation
¶
Overview ¶
Package runechunk splits and cuts platform text at readable rune boundaries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsFence ¶ added in v0.14.0
IsFence reports whether trimmed is a pure code-fence marker: bare ``` always, or ``` plus a single language token when opening a fence. Closing fences carry no info string (CommonMark), and any line with more backticks or extra words is inline content, not a fence.
func LenUTF16 ¶ added in v0.14.0
LenUTF16 counts text in UTF-16 code units, as required by platform limits.
func Split ¶
Split cuts text into chunks of at most limit runes, preferring paragraph breaks, then line breaks, then spaces, then a hard cut. Empty input or a non-positive limit yields no chunks.
func TruncateUTF16 ¶ added in v0.14.0
TruncateUTF16 cuts at a rune boundary within limit UTF-16 code units.
Types ¶
This section is empty.