fun String.combine2(): String = chunked(1).mapIndexed { i, s -> i.toString() + s }.joinToString(", ")
Experiment with this code on Gitpod.io or as a Kotlin Playground
⬅ Back