pub trait CharGroupMatch {
// Required methods
fn has_digits(&self) -> bool;
fn has_digits_radix(&self, radix: u8) -> bool;
fn has_alphanumeric(&self) -> bool;
fn has_alphabetic(&self) -> bool;
fn is_digits_only(&self) -> bool;
fn is_digits_only_radix(&self, radix: u8) -> bool;
}
Expand description
Methods to validate strings with character classes
Required Methods§
Sourcefn has_digits(&self) -> bool
fn has_digits(&self) -> bool
Does the string contain any decimal digits
Sourcefn has_digits_radix(&self, radix: u8) -> bool
fn has_digits_radix(&self, radix: u8) -> bool
Does the string contain any digits any supported radix
Sourcefn has_alphanumeric(&self) -> bool
fn has_alphanumeric(&self) -> bool
Does the string contain any alphanumeric characters including those from non-Latin alphabets
Sourcefn has_alphabetic(&self) -> bool
fn has_alphabetic(&self) -> bool
Does the string contain any letters including those from non-Latin alphabets, but excluding digits
fn is_digits_only(&self) -> bool
Sourcefn is_digits_only_radix(&self, radix: u8) -> bool
fn is_digits_only_radix(&self, radix: u8) -> bool
Does the string contain any digits any supported radix
Implementations on Foreign Types§
Source§impl CharGroupMatch for str
impl CharGroupMatch for str
Source§fn is_digits_only_radix(&self, radix: u8) -> bool
fn is_digits_only_radix(&self, radix: u8) -> bool
Does the string contain any digits any supported radix