<trim></trim>
Provided by module: Tags: Trim
Trims characters from the string. If neither left, center
or right attributes are provided it will trim from both ends of the
given string. If char is unspecified the trim operation removes
whitespace.
Attributes
- left
-
Only trim the left side of the string.
- right
-
Only trim the right side of the string.
- char="{character, string}"
-
Trim the string from character(s) in char. If not provided whitespace
will be removed instead.
<trim char='/' right=''>/some/path/</trim> |
/some/path |
- center
-
Trims the string from the center. Requires the attribute length.
The resulting string may be shorter due to whitespace trimming but will
never exceed the maximum length.
<trim center='' length='20'>A long and meaningless string</trim> |
A long an...s string |
- length="int"
-
Combine with attribute center to set the maximum length of a
center-trimmed string.
- glue="string" (...)
-
Only applies together with attribute center. Defines what string to
use when gluing the left and right side of the string together.
- words
-
Only applies together with attribute center. Requests the cutting
to take place at spaces that delimit words in the string.