Template Engine language reference > Template Engine utilities > String functions > $string.trim

$string.trim
This function returns a copy of the input string with leading and trailing whitespace removed.
Syntax
$string.trim(<inStr>)
inStr
Template examples
Example 108
Template
#set($str='   Hello My Cruel World!    ')
#set($str2=$string.trim($str))
#set($tail='ABC')
Original string and tail: $str$tail
New string and tail: $str2$tail
Output
Original string and tail:    Hello My Cruel World!    ABC
New string and tail: Hello My Cruel World!ABC
 
OpenText StreamServe 5.6.2 Updated: 2018-01-26