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'