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

Method end

crates/stdlib/src/re.rs:378–385  ·  view source on GitHub ↗
(&self, group: OptionalArg, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

376
377 #[pymethod]
378 fn end(&self, group: OptionalArg, vm: &VirtualMachine) -> PyResult {
379 let group = group.unwrap_or_else(|| vm.ctx.new_int(0).into());
380 let end = self.get_bounds(group, vm)?.map_or_else(
381 || vm.ctx.new_int(-1).into(),
382 |r| vm.ctx.new_int(r.end).into(),
383 );
384 Ok(end)
385 }
386
387 fn subgroup(&self, bounds: Range<usize>) -> String {
388 self.haystack.as_str()[bounds].to_owned()

Callers 10

parse_requirementFunction · 0.45
get_versionsFunction · 0.45
from_ruff_parse_errorMethod · 0.45
do_splitFunction · 0.45
create_matchFunction · 0.45
emit_next_tokenFunction · 0.45
get_rangeMethod · 0.45
eprint_locationFunction · 0.45
_emitMethod · 0.45
compile_tstring_intoMethod · 0.45

Calls 2

get_boundsMethod · 0.80
new_intMethod · 0.45

Tested by

no test coverage detected