Hexadecimal digits include 0-9, Latin letters a-f and A-F, and their fullwidth compatibility forms. If the character does not represent a hexadecimal digit, the value of this property is nil.
16進法桁は、0-9、Latin文字 a-f および A-F、そしてそれらの全角互換形式を含みます。文字が16進法桁を表さないならば、このプロパティの値はnilです。
let chars: [Character] = ["1", "a", "F", "g"]for ch in chars {print(ch, "-->", ch.hexDigitValue)}// Prints:// 1 --> Optional(1)// a --> Optional(10)// F --> Optional(15)// g --> nil
See Also
参照
Checking a Character’s Numeric Properties
文字の数値プロパティを確認する