(
&self,
options: ByteInnerSplitOptions,
convert: F,
vm: &VirtualMachine,
)
| 648 | } |
| 649 | |
| 650 | pub fn split<F>( |
| 651 | &self, |
| 652 | options: ByteInnerSplitOptions, |
| 653 | convert: F, |
| 654 | vm: &VirtualMachine, |
| 655 | ) -> PyResult<Vec<PyObjectRef>> |
| 656 | where |
| 657 | F: Fn(&[u8], &VirtualMachine) -> PyObjectRef, |
| 658 | { |
| 659 | let elements = self.elements.py_split( |
| 660 | options, |
| 661 | vm, |
| 662 | || convert(&self.elements, vm), |
| 663 | |v, s, vm| v.split_str(s).map(|v| convert(v, vm)).collect(), |
| 664 | |v, s, n, vm| v.splitn_str(n, s).map(|v| convert(v, vm)).collect(), |
| 665 | |v, n, vm| v.py_split_whitespace(n, |v| convert(v, vm)), |
| 666 | )?; |
| 667 | Ok(elements) |
| 668 | } |
| 669 | |
| 670 | pub fn rsplit<F>( |
| 671 | &self, |
nothing calls this directly
no test coverage detected