Function icu_properties::maps::east_asian_width

source ·
pub const fn east_asian_width() -> CodePointMapDataBorrowed<'static, EastAsianWidth>
Expand description

Return a CodePointMapDataBorrowed for the East_Asian_Width Unicode enumerated property. See EastAsianWidth.

Enabled with the compiled_data Cargo feature.

📚 Help choosing a constructor

§Example

use icu::properties::{maps, EastAsianWidth};

assert_eq!(maps::east_asian_width().get('ア'), EastAsianWidth::Halfwidth); // U+FF71: Halfwidth Katakana Letter A
assert_eq!(maps::east_asian_width().get('ア'), EastAsianWidth::Wide); //U+30A2: Katakana Letter A