mirror of https://github.com/trudnai/Steve2.git
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…
Reference in New Issue