Skip to content

Instantly share code, notes, and snippets.

@thii
Created April 18, 2016 03:53
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 thii/79ef316de5d604cfd9e7201d8c47a161 to your computer and use it in GitHub Desktop.
Save thii/79ef316de5d604cfd9e7201d8c47a161 to your computer and use it in GitHub Desktop.
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