Function
general_count_literal
(
req: &Request<'_, S>,
ctx: &mut MatchContext,
end: usize,
mut f: F,
)
Source from the content-addressed store, hash-verified
| 1409 | } |
| 1410 | |
| 1411 | fn general_count_literal<S: StrDrive, F: FnMut(u32, u32) -> bool>( |
| 1412 | req: &Request<'_, S>, |
| 1413 | ctx: &mut MatchContext, |
| 1414 | end: usize, |
| 1415 | mut f: F, |
| 1416 | ) { |
| 1417 | let ch = ctx.peek_code(req, 1); |
| 1418 | while ctx.cursor.position < end && f(ch, ctx.peek_char::<S>()) { |
| 1419 | ctx.advance_char::<S>(); |
| 1420 | } |
| 1421 | } |
Tested by
no test coverage detected