feat: added a new way to obtain Bluetooth device battery levels using pmset (#2990)

This commit is contained in:
Serhiy Mytrovtsiy
2026-03-05 18:07:13 +01:00
parent 8f9bce3a7a
commit deb6f2050c
3 changed files with 171 additions and 1 deletions

View File

@@ -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()
}