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.
1 parent 7b96f13 commit 6488324Copy full SHA for 6488324
src/libstd/ascii.rs
@@ -498,6 +498,15 @@ mod tests {
498
assert_eq!('`'.to_ascii().to_upper().to_char(), '`');
499
assert_eq!('{'.to_ascii().to_upper().to_char(), '{');
500
501
+ assert!('0'.to_ascii().is_digit());
502
+ assert!('9'.to_ascii().is_digit());
503
+ assert!(!'/'.to_ascii().is_digit());
504
+ assert!(!':'.to_ascii().is_digit());
505
+
506
+ assert!((0x1fu8).to_ascii().is_control());
507
+ assert!(!' '.to_ascii().is_control());
508
+ assert!((0x7fu8).to_ascii().is_control());
509
510
assert!("banana".chars().all(|c| c.is_ascii()));
511
assert!(!"ประเทศไทย中华Việt Nam".chars().all(|c| c.is_ascii()));
512
}
0 commit comments