Trim the trailing whitespace from the string value passed. The code is setup to be included in a package titled "utils", change the package name on the declaration line to add it to any other package.
rtrim
/**
* Remove trailing whitespace from the passed string.
* @param tr {String} value to be trimmed.
*/
utils.rtrim = function(str)
{
return str.replace(/\s+$/g, '');
}
