diff options
author | Derrell Lipman <derrell@samba.org> | 2007-02-14 04:19:13 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:48:12 -0500 |
commit | b79bf0623235672684d7dd79dd7a6b202adfb35f (patch) | |
tree | 3154a686d000b754eb8ff63c25b29d879f8b48e9 /webapps/qooxdoo-0.6.3-sdk/frontend/framework/source/class/qx/lang/String.js | |
parent | ecfbc670c2a641b1f18155af0ed9a6e49278185a (diff) | |
download | samba-b79bf0623235672684d7dd79dd7a6b202adfb35f.tar.gz samba-b79bf0623235672684d7dd79dd7a6b202adfb35f.tar.bz2 samba-b79bf0623235672684d7dd79dd7a6b202adfb35f.zip |
r21326: get rid of old qooxdoo version.
(This used to be commit 39a4803ad1046e2473bdc7b22321a5f61ae3a1ea)
Diffstat (limited to 'webapps/qooxdoo-0.6.3-sdk/frontend/framework/source/class/qx/lang/String.js')
-rw-r--r-- | webapps/qooxdoo-0.6.3-sdk/frontend/framework/source/class/qx/lang/String.js | 158 |
1 files changed, 0 insertions, 158 deletions
diff --git a/webapps/qooxdoo-0.6.3-sdk/frontend/framework/source/class/qx/lang/String.js b/webapps/qooxdoo-0.6.3-sdk/frontend/framework/source/class/qx/lang/String.js deleted file mode 100644 index 9f20f819fc..0000000000 --- a/webapps/qooxdoo-0.6.3-sdk/frontend/framework/source/class/qx/lang/String.js +++ /dev/null @@ -1,158 +0,0 @@ -/* ************************************************************************ - - qooxdoo - the new era of web development - - http://qooxdoo.org - - Copyright: - 2004-2006 by 1&1 Internet AG, Germany, http://www.1and1.org - - License: - LGPL 2.1: http://www.gnu.org/licenses/lgpl.html - - Authors: - * Sebastian Werner (wpbasti) - * Andreas Ecker (ecker) - -************************************************************************ */ - -/* ************************************************************************ - -#module(core) - -************************************************************************ */ - -qx.OO.defineClass("qx.lang.String"); - -qx.Class.toCamelCase = function(str) -{ - var vArr = str.split("-"), vLength = vArr.length; - - if(vLength == 1) { - return vArr[0]; - } - - var vNew = str.indexOf("-") == 0 ? vArr[0].charAt(0).toUpperCase() + vArr[0].substring(1) : vArr[0]; - - for (var vPart, i=1; i<vLength; i++) - { - vPart = vArr[i]; - vNew += vPart.charAt(0).toUpperCase() + vPart.substring(1); - } - - return vNew; -} - -qx.Class.trimLeft = function(str) { - return str.replace(/^\s+/, ""); -} - -qx.Class.trimRight = function(str) { - return str.replace(/\s+$/, ""); -} - -qx.Class.trim = function(str) { - return str.replace(/^\s+|\s+$/g, ""); -} - -qx.Class.stripTags = function(str) { - return str.replace(/<\/?[^>]+>/gi, ""); -} - -qx.Class.startsWith = function(fullstr, substr) { - return !fullstr.indexOf(substr); -} - -qx.Class.endsWith = function(fullstr, substr) { - return fullstr.lastIndexOf(substr) === fullstr.length-substr.length; -} - -qx.Class.pad = function(str, length, ch) -{ - if (typeof ch === "undefined") { - ch = "0"; - } - - var temp = ""; - - for (var i=length, l=str.length; l<i; l++) { - temp += ch; - } - - return temp + str; -} - -qx.Class.toFirstUp = function(str) { - return str.charAt(0).toUpperCase() + str.substr(1); -} - -qx.Class.add = function(str, v, sep) -{ - if (str == v) - { - return str; - } - else if (str == "") - { - return v; - } - else - { - if (qx.util.Validation.isInvalid(sep)) { - sep = ","; - } - - var a = str.split(sep); - - if (a.indexOf(v) == -1) - { - a.push(v); - return a.join(sep); - } - else - { - return str; - } - } -} - -qx.Class.remove = function(str, v, sep) -{ - if (str == v || str == "") - { - return ""; - } - else - { - if (qx.util.Validation.isInvalid(sep)) { - sep = ","; - } - - var a = str.split(sep); - var p = a.indexOf(v); - - if (p === -1) { - return str; - } - - do { a.splice(p, 1); } - while((p = a.indexOf(v)) != -1); - - return a.join(sep); - } -} - -qx.Class.contains = function(str, s) { - return str.indexOf(s) != -1; -} - - -/** - * Escapes all chars that have a special meaning in regular expressions - * - * @param str {string} the string where to escape the chars. - * @return {string} the string with the escaped chars. - */ -qx.Class.escapeRegexpChars = function(str) { - return str.replace(/([\\\.\(\)\[\]\{\}\^\$\?\+\*])/g, "\\$1"); -} |