(
&self,
options: anystr::StartsEndsWithArgs,
vm: &VirtualMachine,
)
| 372 | |
| 373 | #[pymethod] |
| 374 | fn startswith( |
| 375 | &self, |
| 376 | options: anystr::StartsEndsWithArgs, |
| 377 | vm: &VirtualMachine, |
| 378 | ) -> PyResult<bool> { |
| 379 | let (affix, substr) = |
| 380 | match options.prepare(self.as_bytes(), self.len(), |s, r| s.get_bytes(r)) { |
| 381 | Some(x) => x, |
| 382 | None => return Ok(false), |
| 383 | }; |
| 384 | substr.py_starts_ends_with( |
| 385 | &affix, |
| 386 | "startswith", |
| 387 | "bytes", |
| 388 | |s, x: PyBytesInner| s.starts_with(x.as_bytes()), |
| 389 | vm, |
| 390 | ) |
| 391 | } |
| 392 | |
| 393 | #[pymethod] |
| 394 | fn find(&self, options: ByteInnerFindOptions, vm: &VirtualMachine) -> PyResult<isize> { |
nothing calls this directly
no test coverage detected