git-svn-id: svn://euphorik.ch/pompage@47 02bbb61a-6d21-0410-aba0-cb053bdfd66a
[pompage.git] / doc / webdeveloper / common / string.js
diff --git a/doc/webdeveloper/common/string.js b/doc/webdeveloper/common/string.js
deleted file mode 100644 (file)
index fd9709a..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-// Removes a substring from a string
-function webdeveloper_removeSubstring(string, substring)
-{
-    // If the strings are not empty
-    if(string && substring)
-    {
-        var substringStart = string.indexOf(substring);
-
-        // If the substring is found in the string
-        if(substring && substringStart != -1)
-        {
-            return string.substring(0, substringStart) + string.substring(substringStart + substring.length, string.length);
-        }
-
-        return string;
-    }
-
-    return "";
-}
-
-// Tests if a string ends with the given string
-String.prototype.endsWith = function(endsWithString)
-{
-       return (this.substr(this.length - endsWithString.length) == endsWithString);
-}
-
-// Trims leading and trailing spaces from a string
-String.prototype.trim = function()
-{
-    return this.replace(new RegExp("^\\s+|\\s+$", "gi"), "");
-}