(&self, group: OptionalArg, vm: &VirtualMachine)
| 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() |
no test coverage detected