Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added an innerTrim method

  • Loading branch information...
commit 74a9654bbdc46f392bdb07ca4a45b1774337f49d 1 parent 27064c2
@Sembiance authored
Showing with 16 additions and 1 deletion.
  1. +15 −0 String.js
  2. +1 −1  package.json
View
15 String.js
@@ -82,6 +82,21 @@ if(!String.prototype.strip)
};
}
+if(!String.prototype.innerTrim)
+{
+ String.prototype.innerTrim = function()
+ {
+ var text = this;
+ var re = new RegExp(/\s\s/g);
+ while(re.test(text))
+ {
+ text = text.replace(re, " ");
+ }
+
+ return text;
+ };
+}
+
if(!String.prototype.capitalize)
{
View
2  package.json
@@ -1,6 +1,6 @@
{
"name" : "xbase",
- "version" : "1.1.6",
+ "version" : "1.1.7",
"author" : "Robert Schultz <robert@cosmicrealms.com>",
"description" : "common JS files used in all my JS projects",
"private" : true,
Please sign in to comment.
Something went wrong with that request. Please try again.