pub struct Properties(/* private fields */);Expand description
Unicode character properties relevant for text analysis.
Implementations§
Source§impl Properties
impl Properties
Sourcepub fn new(
script: Script,
gc: GeneralCategory,
gcb: GraphemeClusterBreak,
bidi: BidiClass,
is_emoji_or_pictographic: bool,
is_variation_selector: bool,
is_region_indicator: bool,
is_mandatory_linebreak: bool,
needs_dictionary_word_break: bool,
is_emoji: bool,
is_emoji_presentation: bool,
is_emoji_modifier: bool,
is_emoji_modifier_base: bool,
) -> Self
pub fn new( script: Script, gc: GeneralCategory, gcb: GraphemeClusterBreak, bidi: BidiClass, is_emoji_or_pictographic: bool, is_variation_selector: bool, is_region_indicator: bool, is_mandatory_linebreak: bool, needs_dictionary_word_break: bool, is_emoji: bool, is_emoji_presentation: bool, is_emoji_modifier: bool, is_emoji_modifier_base: bool, ) -> Self
Creates a new Properties from the given properties
Sourcepub fn general_category(&self) -> GeneralCategory
pub fn general_category(&self) -> GeneralCategory
Returns the general category for the character.
Sourcepub fn grapheme_cluster_break(&self) -> GraphemeClusterBreak
pub fn grapheme_cluster_break(&self) -> GraphemeClusterBreak
Returns the grapheme cluster break for the character.
Sourcepub fn bidi_class(&self) -> BidiClass
pub fn bidi_class(&self) -> BidiClass
Returns the bidirectional class for the character.
Sourcepub fn is_emoji_or_pictograph(&self) -> bool
pub fn is_emoji_or_pictograph(&self) -> bool
Returns whether the character has either of the Emoji orExtended_Pictographic properties (UTS #51).
Sourcepub fn is_variation_selector(&self) -> bool
pub fn is_variation_selector(&self) -> bool
Returns whether the character is a variation selector.
Sourcepub fn is_region_indicator(&self) -> bool
pub fn is_region_indicator(&self) -> bool
Returns whether the character is a region indicator.
Sourcepub fn is_mandatory_linebreak(&self) -> bool
pub fn is_mandatory_linebreak(&self) -> bool
Returns whether the character is a mandatory linebreak.
Sourcepub fn needs_dictionary_word_break(&self) -> bool
pub fn needs_dictionary_word_break(&self) -> bool
Returns whether the ICU4X word segmenter defers this character to a dictionary to determine the word break boundaries.
Without the dictionary, ICU4X reports a run of such characters as a single word.
Sourcepub fn is_emoji_presentation(&self) -> bool
pub fn is_emoji_presentation(&self) -> bool
Returns whether the character has the Emoji_Presentation property (UTS #51), i.e.
it is displayed as an emoji by default.
Sourcepub fn is_emoji_modifier(&self) -> bool
pub fn is_emoji_modifier(&self) -> bool
Returns whether the character has the Emoji_Modifier property (UTS #51), i.e. it is
a skin tone modifier.
Sourcepub fn is_emoji_modifier_base(&self) -> bool
pub fn is_emoji_modifier_base(&self) -> bool
Returns whether the character has the Emoji_Modifier_Base property (UTS #51), i.e.
it can be followed by a skin tone modifier.