Documentation
¶
Overview ¶
Package stringsx extends the standard strings package with the log/CSV helpers services keep re-writing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FirstNonBlank ¶
FirstNonBlank returns the first value that contains any non-whitespace character, or "". Use stdlib cmp.Or for plain first-non-empty; this variant also skips values that are only spaces — the shape config fallback chains actually need.
func SplitAndTrim ¶
SplitAndTrim splits s on sep, trims whitespace from each part and drops empties — the tolerant reading of human-written lists ("a, b ,,c"). Returns nil when nothing survives. sep follows strings.Split semantics (an empty sep splits per UTF-8 rune).
func Truncate ¶
Truncate returns the first max runes of s (unchanged when it already fits). A negative max reads as 0 — a computed budget gone negative should produce an empty string, not a panic.
func TruncateEllipsis ¶
TruncateEllipsis is Truncate plus a trailing "..." so readers can tell a cut string from a complete one. The ellipsis is added on top of max — it marks truncation rather than tightening the rune budget.
Types ¶
This section is empty.