Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / JU / SB.js
index 5750cb8..2a43996 100644 (file)
-Clazz.declarePackage ("JU");\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.sb = null;\r
-this.s = null;\r
-Clazz.instantialize (this, arguments);\r
-}, JU, "SB");\r
-Clazz.makeConstructor (c$, \r
-function () {\r
-{\r
-this.s = "";\r
-}});\r
-c$.newN = Clazz.defineMethod (c$, "newN", \r
-function (n) {\r
-{\r
-return new JU.SB();\r
-}}, "~N");\r
-c$.newS = Clazz.defineMethod (c$, "newS", \r
-function (s) {\r
-{\r
-var sb = new JU.SB();\r
-sb.s = s;\r
-return sb;\r
-}}, "~S");\r
-Clazz.defineMethod (c$, "append", \r
-function (s) {\r
-{\r
-this.s += s\r
-}return this;\r
-}, "~S");\r
-Clazz.defineMethod (c$, "appendC", \r
-function (c) {\r
-{\r
-this.s += c;\r
-}return this;\r
-}, "~S");\r
-Clazz.defineMethod (c$, "appendI", \r
-function (i) {\r
-{\r
-this.s += i\r
-}return this;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "appendB", \r
-function (b) {\r
-{\r
-this.s += b\r
-}return this;\r
-}, "~B");\r
-Clazz.defineMethod (c$, "appendF", \r
-function (f) {\r
-{\r
-var sf = "" + f;\r
-if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0)\r
-sf += ".0" ;\r
-this.s += sf;\r
-}return this;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "appendD", \r
-function (d) {\r
-{\r
-var sf = "" + d;\r
-if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0)\r
-sf += ".0" ;\r
-this.s += sf;\r
-}return this;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "appendSB", \r
-function (buf) {\r
-{\r
-this.s += buf.s;\r
-}return this;\r
-}, "JU.SB");\r
-Clazz.defineMethod (c$, "appendO", \r
-function (data) {\r
-if (data != null) {\r
-{\r
-this.s += data.toString();\r
-}}return this;\r
-}, "~O");\r
-Clazz.defineMethod (c$, "appendCB", \r
-function (cb, off, len) {\r
-{\r
-for (var i = len,j=off; --i >= 0;)\r
-this.s += cb[j++];\r
-}}, "~A,~N,~N");\r
-Clazz.overrideMethod (c$, "toString", \r
-function () {\r
-{\r
-return this.s;\r
-}});\r
-Clazz.defineMethod (c$, "length", \r
-function () {\r
-{\r
-return this.s.length;\r
-}});\r
-Clazz.defineMethod (c$, "indexOf", \r
-function (s) {\r
-{\r
-return this.s.indexOf(s);\r
-}}, "~S");\r
-Clazz.defineMethod (c$, "charAt", \r
-function (i) {\r
-{\r
-return this.s.charAt(i);\r
-}}, "~N");\r
-Clazz.defineMethod (c$, "charCodeAt", \r
-function (i) {\r
-{\r
-return this.s.charCodeAt(i);\r
-}}, "~N");\r
-Clazz.defineMethod (c$, "setLength", \r
-function (n) {\r
-{\r
-this.s = this.s.substring(0, n);\r
-}}, "~N");\r
-Clazz.defineMethod (c$, "lastIndexOf", \r
-function (s) {\r
-{\r
-return this.s.lastIndexOf(s);\r
-}}, "~S");\r
-Clazz.defineMethod (c$, "indexOf2", \r
-function (s, i) {\r
-{\r
-return this.s.indexOf(s, i);\r
-}}, "~S,~N");\r
-Clazz.defineMethod (c$, "substring", \r
-function (i) {\r
-{\r
-return this.s.substring(i);\r
-}}, "~N");\r
-Clazz.defineMethod (c$, "substring2", \r
-function (i, j) {\r
-{\r
-return this.s.substring(i, j);\r
-}}, "~N,~N");\r
-Clazz.defineMethod (c$, "toBytes", \r
-function (off, len) {\r
-if (len < 0) len = this.length () - off;\r
-var b =  Clazz.newByteArray (len, 0);\r
-for (var i = off + len, j = i - off; --i >= off; ) b[--j] = (this.charAt (i)).charCodeAt (0);\r
-\r
-return b;\r
-}, "~N,~N");\r
-Clazz.defineMethod (c$, "replace", \r
-function (start, end, str) {\r
-{\r
-this.s = this.s.substring(0, start) + str + this.s.substring(end);\r
-}}, "~N,~N,~S");\r
-Clazz.defineMethod (c$, "insert", \r
-function (offset, str) {\r
-this.replace (offset, offset, str);\r
-}, "~N,~S");\r
+Clazz.declarePackage ("JU");
+c$ = Clazz.decorateAsClass (function () {
+this.sb = null;
+this.s = null;
+Clazz.instantialize (this, arguments);
+}, JU, "SB");
+Clazz.makeConstructor (c$, 
+function () {
+{
+this.s = "";
+}});
+c$.newN = Clazz.defineMethod (c$, "newN", 
+function (n) {
+{
+return new JU.SB();
+}}, "~N");
+c$.newS = Clazz.defineMethod (c$, "newS", 
+function (s) {
+{
+var sb = new JU.SB();
+sb.s = s;
+return sb;
+}}, "~S");
+Clazz.defineMethod (c$, "append", 
+function (s) {
+{
+this.s += s
+}return this;
+}, "~S");
+Clazz.defineMethod (c$, "appendC", 
+function (c) {
+{
+this.s += c;
+}return this;
+}, "~S");
+Clazz.defineMethod (c$, "appendI", 
+function (i) {
+{
+this.s += i
+}return this;
+}, "~N");
+Clazz.defineMethod (c$, "appendB", 
+function (b) {
+{
+this.s += b
+}return this;
+}, "~B");
+Clazz.defineMethod (c$, "appendF", 
+function (f) {
+{
+var sf = "" + f;
+if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0)
+sf += ".0" ;
+this.s += sf;
+}return this;
+}, "~N");
+Clazz.defineMethod (c$, "appendD", 
+function (d) {
+{
+var sf = "" + d;
+if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0)
+sf += ".0" ;
+this.s += sf;
+}return this;
+}, "~N");
+Clazz.defineMethod (c$, "appendSB", 
+function (buf) {
+{
+this.s += buf.s;
+}return this;
+}, "JU.SB");
+Clazz.defineMethod (c$, "appendO", 
+function (data) {
+if (data != null) {
+{
+this.s += data.toString();
+}}return this;
+}, "~O");
+Clazz.defineMethod (c$, "appendCB", 
+function (cb, off, len) {
+{
+for (var i = len,j=off; --i >= 0;)
+this.s += cb[j++];
+}}, "~A,~N,~N");
+Clazz.overrideMethod (c$, "toString", 
+function () {
+{
+return this.s;
+}});
+Clazz.defineMethod (c$, "length", 
+function () {
+{
+return this.s.length;
+}});
+Clazz.defineMethod (c$, "indexOf", 
+function (s) {
+{
+return this.s.indexOf(s);
+}}, "~S");
+Clazz.defineMethod (c$, "charAt", 
+function (i) {
+{
+return this.s.charAt(i);
+}}, "~N");
+Clazz.defineMethod (c$, "charCodeAt", 
+function (i) {
+{
+return this.s.charCodeAt(i);
+}}, "~N");
+Clazz.defineMethod (c$, "setLength", 
+function (n) {
+{
+this.s = this.s.substring(0, n);
+}}, "~N");
+Clazz.defineMethod (c$, "lastIndexOf", 
+function (s) {
+{
+return this.s.lastIndexOf(s);
+}}, "~S");
+Clazz.defineMethod (c$, "indexOf2", 
+function (s, i) {
+{
+return this.s.indexOf(s, i);
+}}, "~S,~N");
+Clazz.defineMethod (c$, "substring", 
+function (i) {
+{
+return this.s.substring(i);
+}}, "~N");
+Clazz.defineMethod (c$, "substring2", 
+function (i, j) {
+{
+return this.s.substring(i, j);
+}}, "~N,~N");
+Clazz.defineMethod (c$, "toBytes", 
+function (off, len) {
+if (len < 0) len = this.length () - off;
+var b =  Clazz.newByteArray (len, 0);
+for (var i = off + len, j = i - off; --i >= off; ) b[--j] = (this.charAt (i)).charCodeAt (0);
+
+return b;
+}, "~N,~N");
+Clazz.defineMethod (c$, "replace", 
+function (start, end, str) {
+{
+this.s = this.s.substring(0, start) + str + this.s.substring(end);
+}}, "~N,~N,~S");
+Clazz.defineMethod (c$, "insert", 
+function (offset, str) {
+this.replace (offset, offset, str);
+}, "~N,~S");