WRAPTEXT Wrap text to a maximum line length (Unicode-aware). out = wraptext(txt,width) returns text where each original line is wrapped so that no wrapped line exceeds 'width' visible characters. Words are not split.
Extra rules:
1) Existing newline characters in TXT are respected. I.e. each
paragraph (line) is wrapped independently and separated by '\n'
exactly as in the input.
2) HTML fragments of the form <a ...>...</a> are treated as a single
unbreakable word, even if they contain spaces in attributes.txt ... string or char
width ... positive integerReturns a char vector with '\n' as newline separators.Syntax
out = wraptext(txt,width)