Created
June 1, 2015 08:55
-
-
Save StanislavK/20ae9e0fa7676bad5beb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Array { | |
func combine(separator: String) -> String{ | |
var str : String = "" | |
for (idx, item) in enumerate(self) { | |
str += "\(item)" | |
if idx < self.count-1 { | |
str += separator | |
} | |
} | |
return str | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment