Created
April 18, 2016 03:53
-
-
Save thii/79ef316de5d604cfd9e7201d8c47a161 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 NSUUID { | |
public class func shortUUID() -> String { | |
let uuid = NSUUID().UUIDString | |
let indexOfDash = uuid.rangeOfString("-")!.startIndex | |
return uuid.substringToIndex(indexOfDash) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment