summaryrefslogtreecommitdiff
path: root/includes/js/dojox/string/Builder.js
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 15:39:19 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 15:39:19 +0000
commit1c5685d68f1b73270fb814fe04cbb490eb90ba5f (patch)
tree3d3ada08a934b96fc31531f1327690d7edc6f766 /includes/js/dojox/string/Builder.js
parent104d59099e048688c4dbac37d72137006e396558 (diff)
downloadsemanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.gz
semanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.bz2
Minor fix: Remove DOJO library (60Mo) replaced by link to Google CDN (online DOJO library)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@159 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dojox/string/Builder.js')
-rw-r--r--includes/js/dojox/string/Builder.js101
1 files changed, 0 insertions, 101 deletions
diff --git a/includes/js/dojox/string/Builder.js b/includes/js/dojox/string/Builder.js
deleted file mode 100644
index 02082ec..0000000
--- a/includes/js/dojox/string/Builder.js
+++ /dev/null
@@ -1,101 +0,0 @@
-if(!dojo._hasResource["dojox.string.Builder"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.string.Builder"] = true;
-dojo.provide("dojox.string.Builder");
-
-(function(){
- dojox.string.Builder = function(/*String?*/str){
- // summary:
- // A fast buffer for creating large strings
- // str: The initial string to seed the buffer with
- this.b = dojo.isIE ? [] : "";
- if(str){ this.append(str); }
- };
-
- var m = {
- append: function(/*String*/s){
- // summary: Append all arguments to the end of the buffer
- return this.appendArray(dojo._toArray(arguments)); // dojox.string.Builder
- },
- concat: function(/*String*/s){
- return this.append(s);
- },
- appendArray: function(/*Array*/strings) {
- this.b = String.prototype.concat.apply(this.b, strings);
- return this;
- },
- clear: function(){
- // summary: Remove all characters from the buffer
- this._clear();
- this.length = 0;
- return this;
- },
- replace: function(oldStr,newStr){
- // summary: Replace instances of one string with another in the buffer
- var s = this.toString();
- s = s.replace(oldStr,newStr);
- this._reset(s);
- this.length = s.length;
- return this;
- },
- remove: function(start, len){
- // summary: Remove len characters starting at index start
- if(len == 0){ return this; }
- var s = this.toString();
- this.clear();
- if(start > 0){
- this.append(s.substring(0, start));
- }
- if(start+len < s.length){
- this.append(s.substring(start+len));
- }
- return this;
- },
- insert: function(index, str){
- // summary: Insert string str starting at index
- var s = this.toString();
- this.clear();
- if(index == 0){
- this.append(str);
- this.append(s);
- return this;
- }else{
- this.append(s.substring(0, index));
- this.append(str);
- this.append(s.substring(index));
- }
- return this;
- },
- toString: function(){
- return this.b;
- },
- _clear: function(){
- this.b = "";
- },
- _reset: function(s){
- this.b = s;
- }
- }; // will hold methods for Builder
-
- if(dojo.isIE){
- dojo.mixin(m, {
- toString: function(){
- // Summary: Get the buffer as a string
- return this.b.join("");
- },
- appendArray: function(strings){
- this.b = this.b.concat(strings);
- return this;
- },
- _clear: function(){
- this.b = [];
- },
- _reset: function(s){
- this.b = [ s ];
- }
- });
- }
-
- dojo.extend(dojox.string.Builder, m);
-})();
-
-}