KotlinQuickReference
KotlinQuickReference copied to clipboard
Add a chapter on Strings
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 ...]