mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Remove whitespace
This commit is contained in:
parent
0bea6f8fa3
commit
df57f77686
1 changed files with 0 additions and 4 deletions
|
|
@ -44,16 +44,13 @@ extension String {
|
|||
|
||||
var hexadecimal: Data? {
|
||||
var data = Data(capacity: count / 2)
|
||||
|
||||
let regex = try! NSRegularExpression(pattern: "[0-9a-f]{1,2}", options: .caseInsensitive)
|
||||
regex.enumerateMatches(in: self, range: NSRange(startIndex..., in: self)) { match, _, _ in
|
||||
let byteString = (self as NSString).substring(with: match!.range)
|
||||
let num = UInt8(byteString, radix: 16)!
|
||||
data.append(num)
|
||||
}
|
||||
|
||||
guard data.count > 0 else { return nil }
|
||||
|
||||
return data
|
||||
}
|
||||
|
||||
|
|
@ -80,7 +77,6 @@ extension String {
|
|||
let font = UIFont.systemFont(ofSize: fontSize)
|
||||
let attributes = [NSAttributedString.Key.font: font]
|
||||
let imageSize = imageSize ?? self.size(withAttributes: attributes)
|
||||
|
||||
UIGraphicsBeginImageContextWithOptions(imageSize, false, 0)
|
||||
bgColor.set()
|
||||
let rect = CGRect(origin: .zero, size: imageSize)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue