rtrim
NAME
String.rtrim
FUNCTION
The Javascript function rtrim removes trailing spaces
from a string (spaces on the right side).
EXAMPLE
Example usage:
var x = ' abc ';
var y = x.ltrim(); // returns ' abc'
SOURCE
String.prototype.rtrim = function() {
return this.replace(/\s+$/,"");
}