Skip to content

Instantly share code, notes, and snippets.

@fabiancarlos
Created June 14, 2012 21:45
Show Gist options
  • Save fabiancarlos/2933160 to your computer and use it in GitHub Desktop.
Save fabiancarlos/2933160 to your computer and use it in GitHub Desktop.
Remover todos espaços em branco (JS)
String.prototype.trim = function () {
return this.replace(/^\s*/, "").replace(/\s*$/, "");
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment