Skip to main content

index

Function index 

Source
pub fn index<D: Dimension>(
    a: &StringArray<D>,
    sub: &str,
) -> FerrayResult<Array<i64, D>>
Expand description

Find the lowest character index of sub in each string element, raising when any element does not contain sub.

Mirrors numpy.strings.index. The first miss surfaces as FerrayError::InvalidValue.

ยงErrors

  • FerrayError::InvalidValue if any element does not contain sub.