We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
char::is_digit
1 parent 81d6652 commit 66209cdCopy full SHA for 66209cd
library/core/src/char/methods.rs
@@ -320,8 +320,9 @@ impl char {
320
/// '1'.is_digit(37);
321
/// ```
322
#[stable(feature = "rust1", since = "1.0.0")]
323
+ #[rustc_const_unstable(feature = "const_char_is_digit", issue = "132241")]
324
#[inline]
- pub fn is_digit(self, radix: u32) -> bool {
325
+ pub const fn is_digit(self, radix: u32) -> bool {
326
self.to_digit(radix).is_some()
327
}
328
0 commit comments