wrap
Summary
Returns a wrapped version of the input string.Usage
input|wrap( [ width [, break_sequence [, cut ] ] ] )
Parameters
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. |
Returns
A wrapped version of the input string.Description
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).
Examples
Example 1
{'Hello world'|wrap( 5 )}
The following output will be produced:
Hello
world
Balazs Halasy (05/02/2004 11:02 am)
Balazs Halasy (04/05/2005 2:54 pm)
Comments
There are no comments.