mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
feat: added a new way to obtain Bluetooth device battery levels using pmset (#2990)
This commit is contained in:
@@ -15,6 +15,8 @@ import Carbon
|
||||
extension String: @retroactive LocalizedError {
|
||||
public var errorDescription: String? { return self }
|
||||
|
||||
public var nilIfEmpty: String? { self.isEmpty ? nil : self }
|
||||
|
||||
public var digits: String {
|
||||
return components(separatedBy: CharacterSet.decimalDigits.inverted).joined()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user