MCPcopy Index your code
hub / github.com/RustPython/RustPython / isdigit

Method isdigit

crates/vm/src/builtins/str.rs:957–964  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

955
956 #[pymethod]
957 fn isdigit(&self) -> bool {
958 // python's isdigit also checks if exponents are digits, these are the unicode codepoints for exponents
959 !self.data.is_empty()
960 && self.char_all(|c| {
961 c.is_ascii_digit()
962 || matches!(c, '⁰' | '¹' | '²' | '³' | '⁴' | '⁵' | '⁶' | '⁷' | '⁸' | '⁹')
963 })
964 }
965
966 #[pymethod]
967 fn isdecimal(&self) -> bool {

Callers

nothing calls this directly

Calls 2

char_allMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected