File.js
authorAlan Knowles <alan@akkbhome.com>
Sat, 13 Nov 2010 02:45:34 +0000 (10:45 +0800)
committerAlan Knowles <alan@akkbhome.com>
Sat, 13 Nov 2010 02:45:34 +0000 (10:45 +0800)
File.js

diff --git a/File.js b/File.js
index 4c98468..a7d58f7 100644 (file)
--- a/File.js
+++ b/File.js
@@ -22,9 +22,21 @@ var File = {
 
     SEPARATOR : '/',
 
+    // fixme - this needs a bitter location.. 
+    // they where in a string class before, but  overriding String methods is not a good normally a good idea..
+       
+    rtrim : function (toTrim) {
+        if (this.substr(this.length - toTrim.length) == toTrim) {
+            return this.slice(0, this.length - toTrim.length);
+        }
+   
+        return this;
+    },
+    
     join : function () {
-        // fixme!
-        imports['String.js'].load(String);
+        
+       
+       
         
         var out = "";
         for (var i = 0; i < arguments.length; i++) {