# xarray.DataArray.str.slice

#### DataArray.str.slice(start=None, stop=None, step=None)[[source]](https://github.com/pydata/xarray/blob/main/xarray/core/accessor_str.py#L356-L385)

Slice substrings from each string in the array.

If start, stop, or ‘step\` is array-like, they are broadcast
against the array and applied elementwise.

* **Parameters:**
  * **start** ([`int`](https://docs.python.org/3/builtins/functions.html#int) or [array-like](https://numpy.org/doc/stable/glossary.html#term-array_like) of [`int`](https://docs.python.org/3/builtins/functions.html#int), *optional*) – Start position for slice operation.
    If array-like, it is broadcast.
  * **stop** ([`int`](https://docs.python.org/3/builtins/functions.html#int) or [array-like](https://numpy.org/doc/stable/glossary.html#term-array_like) of [`int`](https://docs.python.org/3/builtins/functions.html#int), *optional*) – Stop position for slice operation.
    If array-like, it is broadcast.
  * **step** ([`int`](https://docs.python.org/3/builtins/functions.html#int) or [array-like](https://numpy.org/doc/stable/glossary.html#term-array_like) of [`int`](https://docs.python.org/3/builtins/functions.html#int), *optional*) – Step size for slice operation.
    If array-like, it is broadcast.
* **Returns:**
  **sliced strings** (`same type as values`)
