We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b5ac431 + b2b2255 commit 36871ffCopy full SHA for 36871ff
core/src/char/methods.rs
@@ -920,7 +920,11 @@ impl char {
920
#[stable(feature = "rust1", since = "1.0.0")]
921
#[inline]
922
pub fn is_alphanumeric(self) -> bool {
923
- self.is_alphabetic() || self.is_numeric()
+ if self.is_ascii() {
924
+ self.is_ascii_alphanumeric()
925
+ } else {
926
+ unicode::Alphabetic(self) || unicode::N(self)
927
+ }
928
}
929
930
/// Returns `true` if this `char` has the general category for control codes.
0 commit comments