mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Update hex formatter to include leading zeros if required to get to 8 characters
This commit is contained in:
parent
2d80511d7d
commit
32b65408ca
1 changed files with 2 additions and 2 deletions
|
|
@ -18,12 +18,12 @@ extension Int {
|
|||
|
||||
extension UInt32 {
|
||||
func toHex() -> String {
|
||||
return String(format: "!%2X", self).lowercased()
|
||||
return String(format: "!%08X", self).lowercased()
|
||||
}
|
||||
}
|
||||
|
||||
extension Int64 {
|
||||
func toHex() -> String {
|
||||
return String(format: "!%2X", self).lowercased()
|
||||
return String(format: "!%08X", self).lowercased()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue