Back to Lo

Core Chunkstring

docs/data/core-chunkstring.md

1.53.0182 B
Original Source

Splits a string into chunks of the given size. The last chunk may be shorter. Returns [""] for empty input.

go
lo.ChunkString("1234567", 2)
// []string{"12", "34", "56", "7"}