summaryrefslogtreecommitdiff
path: root/webapps/qooxdoo-0.6.3-sdk/frontend/framework/source/class/qx/lang/String.js
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@samba.org>2007-01-03 19:57:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:36:06 -0500
commit2e7c59c24470766e37309c7a8bfa4c7b81c57614 (patch)
treec44c89911868c52f25ca66bdefa68e13248db8e6 /webapps/qooxdoo-0.6.3-sdk/frontend/framework/source/class/qx/lang/String.js
parent57f5bf78fa9fc9d190c3cb25251e686a1488f790 (diff)
downloadsamba-2e7c59c24470766e37309c7a8bfa4c7b81c57614.tar.gz
samba-2e7c59c24470766e37309c7a8bfa4c7b81c57614.tar.bz2
samba-2e7c59c24470766e37309c7a8bfa4c7b81c57614.zip
r20515: Continued work on the Web Application Framework. Until we get all of the
functionality of the old scripts incorporated into the new framework, the old scripts need to still be available. I've reverted to having the old scripts be the default pages, and added an option to access the preview of the new SWAT. (This used to be commit b43620d4b8eff815f4a6dc02522a8dfc9fdcaef4)
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.js158
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");
-}