pub enum GeneralCategory {
Show 30 variants
UppercaseLetter,
LowercaseLetter,
TitlecaseLetter,
ModifierLetter,
OtherLetter,
NonspacingMark,
SpacingMark,
EnclosingMark,
DecimalNumber,
LetterNumber,
OtherNumber,
ConnectorPunctuation,
DashPunctuation,
OpenPunctuation,
ClosePunctuation,
InitialPunctuation,
FinalPunctuation,
OtherPunctuation,
MathSymbol,
CurrencySymbol,
ModifierSymbol,
OtherSymbol,
SpaceSeparator,
LineSeparator,
ParagraphSeparator,
Control,
Format,
Surrogate,
PrivateUse,
Unassigned,
}
Expand description
Represents the Unicode Character
General_Category
property.
This is a useful breakdown into various character types which can be used as a default
categorization in implementations. For the property values, see
General_Category Values
.
Variants§
UppercaseLetter
An uppercase letter
LowercaseLetter
A lowercase letter
TitlecaseLetter
A digraphic character, with first part uppercase
ModifierLetter
A modifier letter
OtherLetter
Other letters, including syllables and ideographs
NonspacingMark
A nonspacing combining mark (zero advance width)
SpacingMark
A spacing combining mark (positive advance width)
EnclosingMark
An enclosing combining mark
DecimalNumber
A decimal digit
LetterNumber
A letterlike numeric character
OtherNumber
A numeric character of other type
ConnectorPunctuation
A connecting punctuation mark, like a tie
DashPunctuation
A dash or hyphen punctuation mark
OpenPunctuation
An opening punctuation mark (of a pair)
ClosePunctuation
A closing punctuation mark (of a pair)
InitialPunctuation
An initial quotation mark
FinalPunctuation
A final quotation mark
OtherPunctuation
A punctuation mark of other type
MathSymbol
A symbol of mathematical use
CurrencySymbol
A currency sign
ModifierSymbol
A non-letterlike modifier symbol
OtherSymbol
A symbol of other type
SpaceSeparator
A space character (of various non-zero widths)
LineSeparator
U+2028 LINE SEPARATOR only
ParagraphSeparator
U+2029 PARAGRAPH SEPARATOR only
Control
A C0 or C1 control code
Format
A format control character
Surrogate
A surrogate code point
PrivateUse
A private-use character
Unassigned
Unassigned
Implementations§
Source§impl GeneralCategory
impl GeneralCategory
Sourcepub fn of(ch: char) -> GeneralCategory
pub fn of(ch: char) -> GeneralCategory
Find the GeneralCategory
of a single char.
Source§impl GeneralCategory
impl GeneralCategory
Sourcepub fn is_cased_letter(&self) -> bool
pub fn is_cased_letter(&self) -> bool
Lu
| Ll
| Lt
(Short form: LC
)
Sourcepub fn is_punctuation(&self) -> bool
pub fn is_punctuation(&self) -> bool
Pc
| Pd
| Ps
| Pe
| Pi
| Pf
| Po
(Short form: P
)
Sourcepub fn is_separator(&self) -> bool
pub fn is_separator(&self) -> bool
Zs
| Zl
| Zp
(Short form: Z
)
Trait Implementations§
Source§impl CharProperty for GeneralCategory
impl CharProperty for GeneralCategory
Source§fn prop_abbr_name() -> &'static str
fn prop_abbr_name() -> &'static str
Source§fn prop_long_name() -> &'static str
fn prop_long_name() -> &'static str
Source§fn prop_human_name() -> &'static str
fn prop_human_name() -> &'static str
Source§impl Clone for GeneralCategory
impl Clone for GeneralCategory
Source§fn clone(&self) -> GeneralCategory
fn clone(&self) -> GeneralCategory
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more