Add ChunkStrings to split a string slice into fixed-size batches #4

Merged
sneak merged 1 commits from clawbot/util:proposal-chunk-strings into master 2026-09-05 05:46:04 +02:00

1 Commits

Author SHA1 Message Date
6807a76f24 add ChunkStrings for splitting a string slice into fixed-size batches
ChunkStrings cuts a slice into consecutive pieces of at most the requested
size, with the leftovers in the last piece, and returns copies so the pieces
cannot disturb each other. Comes with a doc comment and table-driven tests.
(closes #3)

Model: opus-5
2026-09-05 03:24:31 +00:00