I have an ArrayList of String in kotlin
private val list = ArrayList<String>()
I want to convert it into String with a separator ",". I know we can do it programatically through loop but in other languages we have mapping functions available like in java we have
StringUtils.join(list);
And in Swift we have
array.joined(separator:",");
Is there any method available to convert ArrayList to String with
a separator in Kotlin?
And what about for adding custom separator like "-" etc?