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

Function is_word

crates/sre_engine/src/string.rs:340–345  ·  view source on GitHub ↗
(ch: u32)

Source from the content-addressed store, hash-verified

338
339#[inline]
340pub(crate) fn is_word(ch: u32) -> bool {
341 ch == '_' as u32
342 || u8::try_from(ch)
343 .map(|x| x.is_ascii_alphanumeric())
344 .unwrap_or(false)
345}
346#[inline]
347pub(crate) fn is_space(ch: u32) -> bool {
348 u8::try_from(ch)

Callers 1

categoryFunction · 0.85

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected