`\bWORD\b` occurrence search from `from`.
(s: &[u8], word: &[u8], mut from: usize)
| 185 | } |
| 186 | |
| 187 | /// `\bWORD\b` occurrence search from `from`. |
| 188 | fn find_word(s: &[u8], word: &[u8], mut from: usize) -> Option<usize> { |
| 189 | loop { |
| 190 | let t = find_bytes(s, word, from)?; |
| 191 | if boundary_before(s, t) && !is_word_at(s, t + word.len()) { |
| 192 | return Some(t); |
| 193 | } |
| 194 | from = t + 1; |
| 195 | } |
| 196 | } |
| 197 | |
| 198 | // ---------- stripCommentsForRegex(src, 'c') ---------- |
no test coverage detected