Skip to content

Instantly share code, notes, and snippets.

@MartinJNash
Created June 7, 2014 00:43
Show Gist options
  • Save MartinJNash/e2bb27937711f350aa44 to your computer and use it in GitHub Desktop.
Save MartinJNash/e2bb27937711f350aa44 to your computer and use it in GitHub Desktop.
Class name to string in Swift
class Person {
class func classString() -> String {
return NSStringFromClass(self)
}
}
Person.classString() // "_TtC11lldb_expr_06Person"
@asilturk
Copy link

asilturk commented Aug 9, 2020

nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment