To join the items of a string array together with Swift 4, you simply call the “joined” member of the String array object.
let myArray = ["A", "B", "C"] let myString = myArray.joined(separator: "-") // myString = "A-B-C"
2 views August 29, 2018 August 30, 2018 bicobro 0
To join the items of a string array together with Swift 4, you simply call the “joined” member of the String array object.
let myArray = ["A", "B", "C"] let myString = myArray.joined(separator: "-") // myString = "A-B-C"