pub const fn script() -> CodePointMapDataBorrowed<'static, Script>
Expand description
Return a CodePointMapDataBorrowed
for the Script Unicode enumerated property. See Script
.
Note: Some code points are associated with multiple scripts. If you are trying to
determine whether a code point belongs to a certain script, you should use
load_script_with_extensions_unstable
and ScriptWithExtensionsBorrowed::has_script
instead of this function.
โจ Enabled with the compiled_data
Cargo feature.
๐ Help choosing a constructor
ยงExample
use icu::properties::{maps, Script};
assert_eq!(maps::script().get('ๆจ'), Script::Han); // U+6728
assert_eq!(maps::script().get('๐'), Script::Common); // U+1F383 JACK-O-LANTERN