Trim string from right - Node.js String

Node.js examples for String:Trim

Description

Trim string from right

Demo Code


String.prototype.rtrim = function(){   
  return this.replace(/(\s*$)/g, "");
};

Related Tutorials