Documentation
¶
Overview ¶
Package text provides small string utilities shared across the codebase.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TruncateMiddle ¶
TruncateMiddle returns s unchanged when its byte length fits within maxBytes. Otherwise it keeps a head and a tail of the input, joined by a "…N chars truncated…" marker, with the byte budget split evenly between head and tail at UTF-8 boundaries. The returned string may exceed maxBytes by the marker length.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.