Skip to main content

rpartition

Function rpartition 

Source
pub fn rpartition<D: Dimension>(
    a: &StringArray<D>,
    sep: &str,
) -> FerrayResult<Vec<(String, String, String)>>
Expand description

Split each element on the last occurrence of sep, returning a (before, sep, after) triple per element.

If sep is not found, the result is ("", "", element) (matching Python / NumPy rpartition).

ยงErrors

  • FerrayError::InvalidValue if sep is empty.