Function icu::properties::maps::load_east_asian_width
source · [−]pub fn load_east_asian_width(
provider: &impl DataProvider<EastAsianWidthV1Marker>
) -> Result<CodePointMapData<EastAsianWidth>, PropertiesError>
Expand description
Return a CodePointMapData
for the East_Asian_Width Unicode enumerated
property. See [EastAsianWidth
].
Example
use icu::properties::{maps, EastAsianWidth};
let data = maps::load_east_asian_width(&icu_testdata::unstable()).expect("The data should be valid!");
let eaw = data.as_borrowed();;
assert_eq!(eaw.get('ア'), EastAsianWidth::Halfwidth); // U+FF71: Halfwidth Katakana Letter A
assert_eq!(eaw.get('ア'), EastAsianWidth::Wide); //U+30A2: Katakana Letter A