This question already has an answer here:
- How do I convert a Swift Array to a String? 18 answers
I know that if I want to convert an array of Int
s to a String
, I do this:
[0,1,1,0].map{"\($0)"}.reduce(""){$0+$1}
but I cannot figure out how would I convert an array of Int
s to a comma separated String
Well you can do it like :