# xarray.core.accessor_str.StringAccessor.wrap

#### StringAccessor.wrap(width, \*\*kwargs)[[source]](https://github.com/pydata/xarray/blob/main/xarray/core/accessor_str.py#L1656-L1681)

Wrap long strings in the array in paragraphs with length less than width.

This method has the same keyword parameters and defaults as
[`textwrap.TextWrapper`](https://docs.python.org/3/library/textwrap.html#textwrap.TextWrapper).

If width is array-like, it is broadcast against the array and applied
elementwise.

* **Parameters:**
  * **width** ([`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)) – Maximum line-width.
    If array-like, it is broadcast.
  * **\*\*kwargs** – keyword arguments passed into [`textwrap.TextWrapper`](https://docs.python.org/3/library/textwrap.html#textwrap.TextWrapper).
* **Returns:**
  **wrapped** (`same type as values`)
