input|wrap( [ width [, break_sequence [, cut ] ] ] )
Name | Type | Description | Required |
---|---|---|---|
width | integer | The width at which the text should be wrapped. | No. |
break_sequence | string | A custom break/newline sequence. | No. |
cut | boolean | TRUE (force wrap) or FALSE (do not force wrap). | No. |
This operator returns a wrapped version of the input string. The string will be wrapped at either the default width (80 characters) or at a width specified using the optional "width" parameter. It inserts newline characters ("\n") or a character/sequence which is specified using the optional "break_sequence" parameter. The "cut" parameter can be set to either TRUE or FALSE - it controls whether the string should always be wrapped at the specified width or not (a word that is larger than the desired width, it will be broken apart).
{'Hello world'|wrap( 5 )}
The following output will be produced:
Hello
world