1 Clazz.declarePackage ("JU");
\r
2 c$ = Clazz.decorateAsClass (function () {
\r
5 Clazz.instantialize (this, arguments);
\r
7 Clazz.makeConstructor (c$,
\r
12 c$.newN = Clazz.defineMethod (c$, "newN",
\r
17 c$.newS = Clazz.defineMethod (c$, "newS",
\r
20 var sb = new JU.SB();
\r
24 Clazz.defineMethod (c$, "append",
\r
30 Clazz.defineMethod (c$, "appendC",
\r
36 Clazz.defineMethod (c$, "appendI",
\r
42 Clazz.defineMethod (c$, "appendB",
\r
48 Clazz.defineMethod (c$, "appendF",
\r
52 if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0)
\r
57 Clazz.defineMethod (c$, "appendD",
\r
61 if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0)
\r
66 Clazz.defineMethod (c$, "appendSB",
\r
72 Clazz.defineMethod (c$, "appendO",
\r
76 this.s += data.toString();
\r
79 Clazz.defineMethod (c$, "appendCB",
\r
80 function (cb, off, len) {
\r
82 for (var i = len,j=off; --i >= 0;)
\r
85 Clazz.overrideMethod (c$, "toString",
\r
90 Clazz.defineMethod (c$, "length",
\r
93 return this.s.length;
\r
95 Clazz.defineMethod (c$, "indexOf",
\r
98 return this.s.indexOf(s);
\r
100 Clazz.defineMethod (c$, "charAt",
\r
103 return this.s.charAt(i);
\r
105 Clazz.defineMethod (c$, "charCodeAt",
\r
108 return this.s.charCodeAt(i);
\r
110 Clazz.defineMethod (c$, "setLength",
\r
113 this.s = this.s.substring(0, n);
\r
115 Clazz.defineMethod (c$, "lastIndexOf",
\r
118 return this.s.lastIndexOf(s);
\r
120 Clazz.defineMethod (c$, "indexOf2",
\r
123 return this.s.indexOf(s, i);
\r
125 Clazz.defineMethod (c$, "substring",
\r
128 return this.s.substring(i);
\r
130 Clazz.defineMethod (c$, "substring2",
\r
133 return this.s.substring(i, j);
\r
135 Clazz.defineMethod (c$, "toBytes",
\r
136 function (off, len) {
\r
137 if (len < 0) len = this.length () - off;
\r
138 var b = Clazz.newByteArray (len, 0);
\r
139 for (var i = off + len, j = i - off; --i >= off; ) b[--j] = (this.charAt (i)).charCodeAt (0);
\r
143 Clazz.defineMethod (c$, "replace",
\r
144 function (start, end, str) {
\r
146 this.s = this.s.substring(0, start) + str + this.s.substring(end);
\r
148 Clazz.defineMethod (c$, "insert",
\r
149 function (offset, str) {
\r
150 this.replace (offset, offset, str);
\r