(&self, options: anystr::StartsEndsWithArgs, vm: &VirtualMachine)
| 895 | |
| 896 | #[pymethod] |
| 897 | fn endswith(&self, options: anystr::StartsEndsWithArgs, vm: &VirtualMachine) -> PyResult<bool> { |
| 898 | let (affix, substr) = |
| 899 | match options.prepare(self.as_wtf8(), self.len(), |s, r| s.get_chars(r)) { |
| 900 | Some(x) => x, |
| 901 | None => return Ok(false), |
| 902 | }; |
| 903 | substr.py_starts_ends_with( |
| 904 | &affix, |
| 905 | "endswith", |
| 906 | "str", |
| 907 | |s, x: &Py<Self>| s.ends_with(x.as_wtf8()), |
| 908 | vm, |
| 909 | ) |
| 910 | } |
| 911 | |
| 912 | #[pymethod] |
| 913 | fn startswith( |
no test coverage detected