joinWith
@JvmOverloads
Creates a string from all the elements separated using separator and using the given prefix and postfix if supplied.
If the collection could be huge, you can specify a non-negative value of limit, in which case only the first limit elements will be appended, followed by the truncated string (which defaults to "...").
Example:
joinWith("H", "e", "l", "l", "o", separator = "") // Hello
joinWith(1, 2, 3, 4, separator = ", ") // 1, 2, 3, 4
Content copied to clipboard
Since
1.1.0
See also
joinToString