String.js
authorAlan Knowles <alan@roojs.com>
Thu, 10 May 2018 07:17:02 +0000 (15:17 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 10 May 2018 07:17:02 +0000 (15:17 +0800)
String.js

index d326c40..0e76ae7 100644 (file)
--- a/String.js
+++ b/String.js
@@ -98,19 +98,19 @@ String.prototype.toggle = function(value, other){
   *
   * @return {String} The clean string
   */
-String.prototype.unicodeClean: function () {
-        return this.replace(/[\s\S]/g,
-            function(character) {
-                if (character.charCodeAt()< 256) {
-                  return character;
-               }
-               try {
-                    encodeURIComponent(character);
-               } catch(e) { 
-                  return '';
-               }
-               return character;
-            }
-        );
-    }
+String.prototype.unicodeClean = function () {
+    return this.replace(/[\s\S]/g,
+        function(character) {
+            if (character.charCodeAt()< 256) {
+              return character;
+           }
+           try {
+                encodeURIComponent(character);
+           } catch(e) { 
+              return '';
+           }
+           return character;
+        }
+    );
+};