Skip to content

text

Package text adds Unicode-aware string scalar functions that SQLite’s built-ins and ext/unicode don’t cover:

text_reverse(s) -- reverse by rune ('abç' → 'çba')
text_repeat(s, n) -- s concatenated n times
text_lpad(s, n[, pad]) -- left-pad to n runes with pad (default ' ')
text_rpad(s, n[, pad]) -- right-pad to n runes
text_split(s, sep, n) -- the 1-based nth field of s split on sep

All counts are in runes, not bytes. Casing/normalization live in ext/unicode; digests in ext/hash; codecs in ext/encode.


Full API: pkg.go.dev/gosqlite.org/ext/text