mirror of
https://github.com/trudnai/Steve2.git
synced 2025-01-17 10:30:35 +00:00
Added two more hex string formats to the HexDigitFormatter
This commit is contained in:
parent
97ce58420e
commit
f2a36f9e33
@ -57,6 +57,12 @@ class HexDigitFormatter: Formatter {
|
||||
if string.starts(with: "#") {
|
||||
hexValue = String(string.dropFirst()).uppercased()
|
||||
}
|
||||
else if string.starts(with: "%") {
|
||||
hexValue = String(string.dropFirst()).uppercased()
|
||||
}
|
||||
else if string.starts(with: "$") {
|
||||
hexValue = String(string.dropFirst()).uppercased()
|
||||
}
|
||||
else if string.starts(with: "0x") {
|
||||
hexValue = String(string.dropFirst(2)).uppercased()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user