pub struct Utf8Char(/* private fields */);
Expand description
representing a UTF-8 character
Note: a UTF-8 character inside UTF8Char indicates an array [u8; 4] so if an UTF-8 charactor’s length of byte greater than 4 is not allow. e.g. ❤️ is 6 bytes length
Implementations§
Source§impl Utf8Char
impl Utf8Char
Sourcepub fn is_whitespace(&self) -> bool
pub fn is_whitespace(&self) -> bool
Return true
if this char is white_space
white_space
includes
, \t
, \r
, \n
Sourcepub fn is_ascii_digit(&self) -> bool
pub fn is_ascii_digit(&self) -> bool
Check if the value is an ASCII decimal digit
0 to 9
Sourcepub fn is_alphabetic(&self) -> bool
pub fn is_alphabetic(&self) -> bool
Return true
if this char is an Alphabetic
Trait Implementations§
impl Copy for Utf8Char
impl Eq for Utf8Char
impl StructuralPartialEq for Utf8Char
Auto Trait Implementations§
impl Freeze for Utf8Char
impl RefUnwindSafe for Utf8Char
impl Send for Utf8Char
impl Sync for Utf8Char
impl Unpin for Utf8Char
impl UnwindSafe for Utf8Char
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more