Function icu_properties::sets::hex_digit

source ·
pub const fn hex_digit() -> CodePointSetDataBorrowed<'static>
Expand description

Characters commonly used for the representation of hexadecimal numbers, plus their compatibility equivalents

Enabled with the compiled_data Cargo feature.

📚 Help choosing a constructor

§Example

use icu::properties::sets;

let hex_digit = sets::hex_digit();

assert!(hex_digit.contains('0'));
assert!(!hex_digit.contains('੩'));  // U+0A69 GURMUKHI DIGIT THREE
assert!(hex_digit.contains('f'));
assert!(hex_digit.contains('f'));  // U+FF46 FULLWIDTH LATIN SMALL LETTER F
assert!(hex_digit.contains('F'));  // U+FF26 FULLWIDTH LATIN CAPITAL LETTER F
assert!(!hex_digit.contains('Ä'));  // U+00C4 LATIN CAPITAL LETTER A WITH DIAERESIS