KotlinQuickReference icon indicating copy to clipboard operation
KotlinQuickReference copied to clipboard

Add a chapter on Strings

Open alvinj opened this issue 6 years ago • 0 comments

Add a chapter on Strings, including converting a list/array to a String:

val nums = listOf(1,2,3,4,5)

> nums.joinToString()
1, 2, 3, 4, 5

> nums.joinToString(
    separator = ", ",
    prefix = "[",
    postfix = "]",
    limit = 3,
    truncated = "there’s more ..."
)
[1, 2, 3, there’s more ...]

alvinj avatar Dec 02 '18 01:12 alvinj