# wrap-width
Greedy word wrap at `w` display cells: breaks at spaces when possible,
hard-breaks words longer than the width, and never splits a wide
glyph's cell pair. Newlines in the input start fresh lines. The
display-aware replacement for hand-rolled column wrapping in chat, log,
and markdown UIs.
## Syntax
[wrap-width $s $width]
## Examples
[wrap-width "over the lazy dog" 12] # @("over the" "lazy dog") [wrap-width "中文测试 wide chars" 8] # @("中文测试" "wide" "chars") [wrap-width "aaaaaaaaaa bbb" 7] # @("aaaaaaa" "aaa bbb") hard break
## Returns
List of wrapped lines, each within `width` display cells.
## See Also
`width`, `truncate-width`, `lines`