Commit Graph

1 Commits

Author SHA1 Message Date
daaea4e10f add TruncateString for shortening a string safely
TruncateString returns at most the requested number of characters from the
start of a string, counting characters rather than bytes so a multi-byte
character is never cut in half. Comes with a doc comment and table-driven
tests. (closes #5)

Model: opus-5
2026-09-05 03:25:08 +00:00