Version: v0.6.1 - Beta.  We welcome contributors & feedback.  THanks!

String.trimRight

trimRight($trimChars = '')

Description

Remove all trailing whitespace characters, including newlines.

$trimChars can be a string of characters to trim in addition to whitespace.

'  abc  '.trimRight();     //= '  abc'
'23%    '.trimRight('%');  //= '23'

See Also