Created
October 22, 2014 02:26
-
-
Save jimmyhillis/c2cbf31ebf7d2923ab5b to your computer and use it in GitHub Desktop.
Swifty
This file contains hidden or 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
// Break a name into two | |
let nameParts = split(json["_name"].stringValue) { $0 == " " } | |
let firstName = nameParts.first | |
let lastName = nameParts.count > 1 ? join(" ", nameParts[1...nameParts.count-1]) : "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeah that does look very bleh
Modern and nearly unreadable :P