Skip to content

Instantly share code, notes, and snippets.

@zonble
Created November 25, 2019 06:29
Show Gist options
  • Save zonble/fd31ffa897506d68a0ceb783a6f83336 to your computer and use it in GitHub Desktop.
Save zonble/fd31ffa897506d68a0ceb783a6f83336 to your computer and use it in GitHub Desktop.
import UIKit
import Foundation
extension OSStatus {
var stringValue: String? {
withUnsafeBytes(of: self) {
String(bytes: $0, encoding: .ascii)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment