# `Ussd.Wordwrap`
[🔗](https://github.com/spesohq/ussd/blob/main/lib/ussd/wordwrap.ex#L1)

Splits long text into `width`-wide chunks for `truncate/1`.

Not a byte-for-byte port of PHP's `wordwrap()` - this treats every run of
whitespace (including newlines) as breakable, then greedily packs words back into
lines up to `width` characters, hard-splitting any single word longer than `width`.

# `chunks`

```elixir
@spec chunks(String.t(), pos_integer()) :: [String.t()]
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
