(&self, options: anystr::StartsEndsWithArgs, vm: &VirtualMachine)
| 365 | |
| 366 | #[pymethod] |
| 367 | fn endswith(&self, options: anystr::StartsEndsWithArgs, vm: &VirtualMachine) -> PyResult<bool> { |
| 368 | let borrowed = self.borrow_buf(); |
| 369 | let (affix, substr) = |
| 370 | match options.prepare(&*borrowed, borrowed.len(), |s, r| s.get_bytes(r)) { |
| 371 | Some(x) => x, |
| 372 | None => return Ok(false), |
| 373 | }; |
| 374 | substr.py_starts_ends_with( |
| 375 | &affix, |
| 376 | "endswith", |
| 377 | "bytes", |
| 378 | |s, x: PyBytesInner| s.ends_with(x.as_bytes()), |
| 379 | vm, |
| 380 | ) |
| 381 | } |
| 382 | |
| 383 | #[pymethod] |
| 384 | fn startswith( |
nothing calls this directly
no test coverage detected