clawbot 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
2020-09-21 17:18:04 -07:00
2024-06-01 22:35:57 +00:00

sneak/goutil

This is a bunch of little general-purpose go utility functions that I don't feel comfortable including as-is in my normal projects as they are too general, so I put them here.

Suggestions are welcome.

Really I think most of these should probably be in the stdlib.

License

WTFPL (free software, no restrictions)

Author

Description
No description provided
Readme WTFPL 60 KiB
Languages
Go 99.9%