Skip to content

Instantly share code, notes, and snippets.

@jbosse
Created October 29, 2015 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbosse/e1d5b095ab02a93766ca to your computer and use it in GitHub Desktop.
Save jbosse/e1d5b095ab02a93766ca to your computer and use it in GitHub Desktop.
extension String {
func split(seperator: Character) -> [String]{
return self.characters.split{$0 == seperator}.map{String($0).stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceCharacterSet())}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment