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

Function general_count_literal

crates/sre_engine/src/engine.rs:1411–1421  ·  view source on GitHub ↗
(
    req: &Request<'_, S>,
    ctx: &mut MatchContext,
    end: usize,
    mut f: F,
)

Source from the content-addressed store, hash-verified

1409}
1410
1411fn 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}

Callers 1

_countFunction · 0.85

Calls 2

peek_codeMethod · 0.80
fFunction · 0.50

Tested by

no test coverage detected