(&self, test: F)
| 528 | } |
| 529 | |
| 530 | fn char_all<F>(&self, test: F) -> bool |
| 531 | where |
| 532 | F: Fn(char) -> bool, |
| 533 | { |
| 534 | match self.as_str_kind() { |
| 535 | PyKindStr::Ascii(s) => s.chars().all(|ch| test(ch.into())), |
| 536 | PyKindStr::Utf8(s) => s.chars().all(test), |
| 537 | PyKindStr::Wtf8(w) => w.code_points().all(|ch| ch.is_char_and(&test)), |
| 538 | } |
| 539 | } |
| 540 | |
| 541 | fn repeat(zelf: PyRef<Self>, value: isize, vm: &VirtualMachine) -> PyResult<PyRef<Self>> { |
| 542 | if value == 0 && zelf.class().is(vm.ctx.types.str_type) { |
no test coverage detected