Kotlin HashSet joinTo()
Syntax & Examples


Syntax of HashSet.joinTo()

The syntax of HashSet.joinTo() extension function is:

fun <T, A : Appendable> Iterable<T>.joinTo( buffer: A, separator: CharSequence = ", ", prefix: CharSequence = "", postfix: CharSequence = "", limit: Int = -1, truncated: CharSequence = "...", transform: ((T) -> CharSequence)? = null ): A

This joinTo() extension function of HashSet appends the string from all the elements separated using separator and using the given prefix and postfix if supplied.