format.wordWrap ViewHelper <vhs:format.wordWrap>
¶
Wordwrap: Wrap a string at provided character count¶
Wraps a string to $limit characters and at $break character while maintaining complete words. Concatenates the resulting strings with $glue. Code is heavily inspired by Codeigniter's word_wrap helper.
Arguments¶
subject¶
- DataType
string
- Required
false
- Description
Text to wrap
limit¶
- DataType
integer
- Default
80
- Required
false
- Description
Maximum length of resulting parts after wrapping
break¶
- DataType
string
- Required
false
- Description
Character to wrap text at
glue¶
- DataType
string
- Required
false
- Description
Character to concatenate parts with after wrapping