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)
| 191 | /// An ASCII word character is defined by the following character class: |
| 192 | /// `[_0-9a-zA-Z]'. |
| 193 | pub 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)] |
| 201 | mod tests { |
no outgoing calls
no test coverage detected