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

$string.trimRight
This function returns a copy of the input string with trailing whitespace removed.
Syntax
$string.trimRight(<inStr>)
inStr
Template examples
Example 107
Template
#set($str='Hello My Cruel World!    ')
#set($str2=$string.trimRight($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