fun StringBand(initialCapacity: Int) { require(initialCapacity > 0) { "Invalid initial capacity" } array = arrayOfNulls<String (initialCapacity) }
Creates an empty < code > StringBand < /code > with provided capacity . Capacity refers to internal string array ( i.e . number of joins ) and not the total string size .