Created
November 7, 2023 06:53
-
-
Save igorleonovich/e7c613a44e6c3c3312023da48b2996e9 to your computer and use it in GitHub Desktop.
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
extension String { | |
static func pointer(_ object: AnyObject?) -> String { | |
guard let object = object else { return "nil" } | |
let opaque: UnsafeMutableRawPointer = Unmanaged.passUnretained(object).toOpaque() | |
return String(describing: opaque) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment