MCPcopy Create free account
hub / github.com/davidblewett/rure-python / is_word_byte

Function is_word_byte

regex/regex-syntax/src/lib.rs:193–198  ·  view source on GitHub ↗

Returns true if and only if the given character is an ASCII word character. An ASCII word character is defined by the following character class: `[_0-9a-zA-Z]'.

(c: u8)

Source from the content-addressed store, hash-verified

191/// An ASCII word character is defined by the following character class:
192/// `[_0-9a-zA-Z]'.
193pub fn is_word_byte(c: u8) -> bool {
194 match c {
195 b'_' | b'0' ... b'9' | b'a' ... b'z' | b'A' ... b'Z' => true,
196 _ => false,
197 }
198}
199
200#[cfg(test)]
201mod tests {

Callers 2

is_word_byteMethod · 0.85
is_word_characterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected