pub fn slice<D: Dimension>(
a: &StringArray<D>,
start: Option<isize>,
stop: Option<isize>,
) -> FerrayResult<StringArray<D>>Expand description
Slice each element by character index — s[start..stop] with negative
indices counting from the end (Python-style). None for either bound
keeps the corresponding edge.
step is intentionally not supported here (numpy.strings.slice’s
step parameter requires character-level reverse iteration that is
non-trivial under multi-byte UTF-8). Pass two slice calls if you need
[start:stop:step] behavior.
§Errors
Returns an error if the internal array construction fails.