Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / swingjs / j2s / javax / swing / text / AbstractWriter.js
index 6cdb528..5493acb 100644 (file)
-Clazz.declarePackage ("javax.swing.text");\r
-Clazz.load (null, "javax.swing.text.AbstractWriter", ["java.lang.Character", "javax.swing.text.ElementIterator", "$.Segment"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.it = null;\r
-this.out = null;\r
-this.indentLevel = 0;\r
-this.indentSpace = 2;\r
-this.doc = null;\r
-this.maxLineLength = 100;\r
-this.currLength = 0;\r
-this.startOffset = 0;\r
-this.endOffset = 0;\r
-this.offsetIndent = 0;\r
-this.lineSeparator = null;\r
-this.canWrapLines = false;\r
-this.$isLineEmpty = false;\r
-this.indentChars = null;\r
-this.tempChars = null;\r
-this.newlineChars = null;\r
-this.segment = null;\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing.text, "AbstractWriter");\r
-Clazz.makeConstructor (c$, \r
-function (w, doc) {\r
-this.construct (w, doc, 0, doc.getLength ());\r
-}, "java.io.Writer,javax.swing.text.Document");\r
-Clazz.makeConstructor (c$, \r
-function (w, doc, pos, len) {\r
-this.doc = doc;\r
-this.it =  new javax.swing.text.ElementIterator (doc.getDefaultRootElement ());\r
-this.out = w;\r
-this.startOffset = pos;\r
-this.endOffset = pos + len;\r
-var docNewline = doc.getProperty ("__EndOfLine__");\r
-if (Clazz.instanceOf (docNewline, String)) {\r
-this.setLineSeparator (docNewline);\r
-} else {\r
-var newline = null;\r
-try {\r
-newline = System.getProperty ("line.separator");\r
-} catch (se) {\r
-if (Clazz.exceptionOf (se, SecurityException)) {\r
-} else {\r
-throw se;\r
-}\r
-}\r
-if (newline == null) {\r
-newline = "\n";\r
-}this.setLineSeparator (newline);\r
-}this.canWrapLines = true;\r
-}, "java.io.Writer,javax.swing.text.Document,~N,~N");\r
-Clazz.makeConstructor (c$, \r
-function (w, root) {\r
-this.construct (w, root, 0, root.getEndOffset ());\r
-}, "java.io.Writer,javax.swing.text.Element");\r
-Clazz.makeConstructor (c$, \r
-function (w, root, pos, len) {\r
-this.doc = root.getDocument ();\r
-this.it =  new javax.swing.text.ElementIterator (root);\r
-this.out = w;\r
-this.startOffset = pos;\r
-this.endOffset = pos + len;\r
-this.canWrapLines = true;\r
-}, "java.io.Writer,javax.swing.text.Element,~N,~N");\r
-Clazz.defineMethod (c$, "getStartOffset", \r
-function () {\r
-return this.startOffset;\r
-});\r
-Clazz.defineMethod (c$, "getEndOffset", \r
-function () {\r
-return this.endOffset;\r
-});\r
-Clazz.defineMethod (c$, "getElementIterator", \r
-function () {\r
-return this.it;\r
-});\r
-Clazz.defineMethod (c$, "getWriter", \r
-function () {\r
-return this.out;\r
-});\r
-Clazz.defineMethod (c$, "getDocument", \r
-function () {\r
-return this.doc;\r
-});\r
-Clazz.defineMethod (c$, "inRange", \r
-function (next) {\r
-var startOffset = this.getStartOffset ();\r
-var endOffset = this.getEndOffset ();\r
-if ((next.getStartOffset () >= startOffset && next.getStartOffset () < endOffset) || (startOffset >= next.getStartOffset () && startOffset < next.getEndOffset ())) {\r
-return true;\r
-}return false;\r
-}, "javax.swing.text.Element");\r
-Clazz.defineMethod (c$, "getText", \r
-function (elem) {\r
-return this.doc.getText (elem.getStartOffset (), elem.getEndOffset () - elem.getStartOffset ());\r
-}, "javax.swing.text.Element");\r
-Clazz.defineMethod (c$, "text", \r
-function (elem) {\r
-var start = Math.max (this.getStartOffset (), elem.getStartOffset ());\r
-var end = Math.min (this.getEndOffset (), elem.getEndOffset ());\r
-if (start < end) {\r
-if (this.segment == null) {\r
-this.segment =  new javax.swing.text.Segment ();\r
-}this.getDocument ().getText (start, end - start, this.segment);\r
-if (this.segment.count > 0) {\r
-this.write (this.segment.array, this.segment.offset, this.segment.count);\r
-}}}, "javax.swing.text.Element");\r
-Clazz.defineMethod (c$, "setLineLength", \r
-function (l) {\r
-this.maxLineLength = l;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "getLineLength", \r
-function () {\r
-return this.maxLineLength;\r
-});\r
-Clazz.defineMethod (c$, "setCurrentLineLength", \r
-function (length) {\r
-this.currLength = length;\r
-this.$isLineEmpty = (this.currLength == 0);\r
-}, "~N");\r
-Clazz.defineMethod (c$, "getCurrentLineLength", \r
-function () {\r
-return this.currLength;\r
-});\r
-Clazz.defineMethod (c$, "isLineEmpty", \r
-function () {\r
-return this.$isLineEmpty;\r
-});\r
-Clazz.defineMethod (c$, "setCanWrapLines", \r
-function (newValue) {\r
-this.canWrapLines = newValue;\r
-}, "~B");\r
-Clazz.defineMethod (c$, "getCanWrapLines", \r
-function () {\r
-return this.canWrapLines;\r
-});\r
-Clazz.defineMethod (c$, "setIndentSpace", \r
-function (space) {\r
-this.indentSpace = space;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "getIndentSpace", \r
-function () {\r
-return this.indentSpace;\r
-});\r
-Clazz.defineMethod (c$, "setLineSeparator", \r
-function (value) {\r
-this.lineSeparator = value;\r
-}, "~S");\r
-Clazz.defineMethod (c$, "getLineSeparator", \r
-function () {\r
-return this.lineSeparator;\r
-});\r
-Clazz.defineMethod (c$, "incrIndent", \r
-function () {\r
-if (this.offsetIndent > 0) {\r
-this.offsetIndent++;\r
-} else {\r
-if (++this.indentLevel * this.getIndentSpace () >= this.getLineLength ()) {\r
-this.offsetIndent++;\r
---this.indentLevel;\r
-}}});\r
-Clazz.defineMethod (c$, "decrIndent", \r
-function () {\r
-if (this.offsetIndent > 0) {\r
---this.offsetIndent;\r
-} else {\r
-this.indentLevel--;\r
-}});\r
-Clazz.defineMethod (c$, "getIndentLevel", \r
-function () {\r
-return this.indentLevel;\r
-});\r
-Clazz.defineMethod (c$, "indent", \r
-function () {\r
-var max = this.getIndentLevel () * this.getIndentSpace ();\r
-if (this.indentChars == null || max > this.indentChars.length) {\r
-this.indentChars =  Clazz.newCharArray (max, '\0');\r
-for (var counter = 0; counter < max; counter++) {\r
-this.indentChars[counter] = ' ';\r
-}\r
-}var length = this.getCurrentLineLength ();\r
-var wasEmpty = this.isLineEmpty ();\r
-this.output (this.indentChars, 0, max);\r
-if (wasEmpty && length == 0) {\r
-this.$isLineEmpty = true;\r
-}});\r
-Clazz.defineMethod (c$, "write", \r
-function (ch) {\r
-if (this.tempChars == null) {\r
-this.tempChars =  Clazz.newCharArray (128, '\0');\r
-}this.tempChars[0] = ch;\r
-this.write (this.tempChars, 0, 1);\r
-}, "~S");\r
-Clazz.defineMethod (c$, "write", \r
-function (content) {\r
-if (content == null) {\r
-return;\r
-}var size = content.length;\r
-if (this.tempChars == null || this.tempChars.length < size) {\r
-this.tempChars =  Clazz.newCharArray (size, '\0');\r
-}content.getChars (0, size, this.tempChars, 0);\r
-this.write (this.tempChars, 0, size);\r
-}, "~S");\r
-Clazz.defineMethod (c$, "writeLineSeparator", \r
-function () {\r
-var newline = this.getLineSeparator ();\r
-var length = newline.length;\r
-if (this.newlineChars == null || this.newlineChars.length < length) {\r
-this.newlineChars =  Clazz.newCharArray (length, '\0');\r
-}newline.getChars (0, length, this.newlineChars, 0);\r
-this.output (this.newlineChars, 0, length);\r
-this.setCurrentLineLength (0);\r
-});\r
-Clazz.defineMethod (c$, "write", \r
-function (chars, startIndex, length) {\r
-if (!this.getCanWrapLines ()) {\r
-var lastIndex = startIndex;\r
-var endIndex = startIndex + length;\r
-var newlineIndex = this.indexOf (chars, '\u000a', startIndex, endIndex);\r
-while (newlineIndex != -1) {\r
-if (newlineIndex > lastIndex) {\r
-this.output (chars, lastIndex, newlineIndex - lastIndex);\r
-}this.writeLineSeparator ();\r
-lastIndex = newlineIndex + 1;\r
-newlineIndex = this.indexOf (chars, '\n', lastIndex, endIndex);\r
-}\r
-if (lastIndex < endIndex) {\r
-this.output (chars, lastIndex, endIndex - lastIndex);\r
-}} else {\r
-var lastIndex = startIndex;\r
-var endIndex = startIndex + length;\r
-var lineLength = this.getCurrentLineLength ();\r
-var maxLength = this.getLineLength ();\r
-while (lastIndex < endIndex) {\r
-var newlineIndex = this.indexOf (chars, '\u000a', lastIndex, endIndex);\r
-var needsNewline = false;\r
-var forceNewLine = false;\r
-lineLength = this.getCurrentLineLength ();\r
-if (newlineIndex != -1 && (lineLength + (newlineIndex - lastIndex)) < maxLength) {\r
-if (newlineIndex > lastIndex) {\r
-this.output (chars, lastIndex, newlineIndex - lastIndex);\r
-}lastIndex = newlineIndex + 1;\r
-forceNewLine = true;\r
-} else if (newlineIndex == -1 && (lineLength + (endIndex - lastIndex)) < maxLength) {\r
-if (endIndex > lastIndex) {\r
-this.output (chars, lastIndex, endIndex - lastIndex);\r
-}lastIndex = endIndex;\r
-} else {\r
-var breakPoint = -1;\r
-var maxBreak = Math.min (endIndex - lastIndex, maxLength - lineLength - 1);\r
-var counter = 0;\r
-while (counter < maxBreak) {\r
-if (Character.isWhitespace (chars[counter + lastIndex])) {\r
-breakPoint = counter;\r
-}counter++;\r
-}\r
-if (breakPoint != -1) {\r
-breakPoint += lastIndex + 1;\r
-this.output (chars, lastIndex, breakPoint - lastIndex);\r
-lastIndex = breakPoint;\r
-needsNewline = true;\r
-} else {\r
-counter = Math.max (0, maxBreak);\r
-maxBreak = endIndex - lastIndex;\r
-while (counter < maxBreak) {\r
-if (Character.isWhitespace (chars[counter + lastIndex])) {\r
-breakPoint = counter;\r
-break;\r
-}counter++;\r
-}\r
-if (breakPoint == -1) {\r
-this.output (chars, lastIndex, endIndex - lastIndex);\r
-breakPoint = endIndex;\r
-} else {\r
-breakPoint += lastIndex;\r
-if (chars[breakPoint] == '\u000a') {\r
-this.output (chars, lastIndex, breakPoint++ - lastIndex);\r
-forceNewLine = true;\r
-} else {\r
-this.output (chars, lastIndex, ++breakPoint - lastIndex);\r
-needsNewline = true;\r
-}}lastIndex = breakPoint;\r
-}}if (forceNewLine || needsNewline || lastIndex < endIndex) {\r
-this.writeLineSeparator ();\r
-if (lastIndex < endIndex || !forceNewLine) {\r
-this.indent ();\r
-}}}\r
-}}, "~A,~N,~N");\r
-Clazz.defineMethod (c$, "writeAttributes", \r
-function (attr) {\r
-var names = attr.getAttributeNames ();\r
-while (names.hasMoreElements ()) {\r
-var name = names.nextElement ();\r
-this.write (" " + name + "=" + attr.getAttribute (name));\r
-}\r
-}, "javax.swing.text.AttributeSet");\r
-Clazz.defineMethod (c$, "output", \r
-function (content, start, length) {\r
-this.getWriter ().write (content, start, length);\r
-this.setCurrentLineLength (this.getCurrentLineLength () + length);\r
-}, "~A,~N,~N");\r
-Clazz.defineMethod (c$, "indexOf", \r
- function (chars, sChar, startIndex, endIndex) {\r
-while (startIndex < endIndex) {\r
-if (chars[startIndex] == sChar) {\r
-return startIndex;\r
-}startIndex++;\r
-}\r
-return -1;\r
-}, "~A,~S,~N,~N");\r
-Clazz.defineStatics (c$,\r
-"NEWLINE", '\n');\r
-});\r
+Clazz.declarePackage ("javax.swing.text");
+Clazz.load (null, "javax.swing.text.AbstractWriter", ["java.lang.Character", "javax.swing.text.ElementIterator", "$.Segment"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.it = null;
+this.out = null;
+this.indentLevel = 0;
+this.indentSpace = 2;
+this.doc = null;
+this.maxLineLength = 100;
+this.currLength = 0;
+this.startOffset = 0;
+this.endOffset = 0;
+this.offsetIndent = 0;
+this.lineSeparator = null;
+this.canWrapLines = false;
+this.$isLineEmpty = false;
+this.indentChars = null;
+this.tempChars = null;
+this.newlineChars = null;
+this.segment = null;
+Clazz.instantialize (this, arguments);
+}, javax.swing.text, "AbstractWriter");
+Clazz.makeConstructor (c$, 
+function (w, doc) {
+this.construct (w, doc, 0, doc.getLength ());
+}, "java.io.Writer,javax.swing.text.Document");
+Clazz.makeConstructor (c$, 
+function (w, doc, pos, len) {
+this.doc = doc;
+this.it =  new javax.swing.text.ElementIterator (doc.getDefaultRootElement ());
+this.out = w;
+this.startOffset = pos;
+this.endOffset = pos + len;
+var docNewline = doc.getProperty ("__EndOfLine__");
+if (Clazz.instanceOf (docNewline, String)) {
+this.setLineSeparator (docNewline);
+} else {
+var newline = null;
+try {
+newline = System.getProperty ("line.separator");
+} catch (se) {
+if (Clazz.exceptionOf (se, SecurityException)) {
+} else {
+throw se;
+}
+}
+if (newline == null) {
+newline = "\n";
+}this.setLineSeparator (newline);
+}this.canWrapLines = true;
+}, "java.io.Writer,javax.swing.text.Document,~N,~N");
+Clazz.makeConstructor (c$, 
+function (w, root) {
+this.construct (w, root, 0, root.getEndOffset ());
+}, "java.io.Writer,javax.swing.text.Element");
+Clazz.makeConstructor (c$, 
+function (w, root, pos, len) {
+this.doc = root.getDocument ();
+this.it =  new javax.swing.text.ElementIterator (root);
+this.out = w;
+this.startOffset = pos;
+this.endOffset = pos + len;
+this.canWrapLines = true;
+}, "java.io.Writer,javax.swing.text.Element,~N,~N");
+Clazz.defineMethod (c$, "getStartOffset", 
+function () {
+return this.startOffset;
+});
+Clazz.defineMethod (c$, "getEndOffset", 
+function () {
+return this.endOffset;
+});
+Clazz.defineMethod (c$, "getElementIterator", 
+function () {
+return this.it;
+});
+Clazz.defineMethod (c$, "getWriter", 
+function () {
+return this.out;
+});
+Clazz.defineMethod (c$, "getDocument", 
+function () {
+return this.doc;
+});
+Clazz.defineMethod (c$, "inRange", 
+function (next) {
+var startOffset = this.getStartOffset ();
+var endOffset = this.getEndOffset ();
+if ((next.getStartOffset () >= startOffset && next.getStartOffset () < endOffset) || (startOffset >= next.getStartOffset () && startOffset < next.getEndOffset ())) {
+return true;
+}return false;
+}, "javax.swing.text.Element");
+Clazz.defineMethod (c$, "getText", 
+function (elem) {
+return this.doc.getText (elem.getStartOffset (), elem.getEndOffset () - elem.getStartOffset ());
+}, "javax.swing.text.Element");
+Clazz.defineMethod (c$, "text", 
+function (elem) {
+var start = Math.max (this.getStartOffset (), elem.getStartOffset ());
+var end = Math.min (this.getEndOffset (), elem.getEndOffset ());
+if (start < end) {
+if (this.segment == null) {
+this.segment =  new javax.swing.text.Segment ();
+}this.getDocument ().getText (start, end - start, this.segment);
+if (this.segment.count > 0) {
+this.write (this.segment.array, this.segment.offset, this.segment.count);
+}}}, "javax.swing.text.Element");
+Clazz.defineMethod (c$, "setLineLength", 
+function (l) {
+this.maxLineLength = l;
+}, "~N");
+Clazz.defineMethod (c$, "getLineLength", 
+function () {
+return this.maxLineLength;
+});
+Clazz.defineMethod (c$, "setCurrentLineLength", 
+function (length) {
+this.currLength = length;
+this.$isLineEmpty = (this.currLength == 0);
+}, "~N");
+Clazz.defineMethod (c$, "getCurrentLineLength", 
+function () {
+return this.currLength;
+});
+Clazz.defineMethod (c$, "isLineEmpty", 
+function () {
+return this.$isLineEmpty;
+});
+Clazz.defineMethod (c$, "setCanWrapLines", 
+function (newValue) {
+this.canWrapLines = newValue;
+}, "~B");
+Clazz.defineMethod (c$, "getCanWrapLines", 
+function () {
+return this.canWrapLines;
+});
+Clazz.defineMethod (c$, "setIndentSpace", 
+function (space) {
+this.indentSpace = space;
+}, "~N");
+Clazz.defineMethod (c$, "getIndentSpace", 
+function () {
+return this.indentSpace;
+});
+Clazz.defineMethod (c$, "setLineSeparator", 
+function (value) {
+this.lineSeparator = value;
+}, "~S");
+Clazz.defineMethod (c$, "getLineSeparator", 
+function () {
+return this.lineSeparator;
+});
+Clazz.defineMethod (c$, "incrIndent", 
+function () {
+if (this.offsetIndent > 0) {
+this.offsetIndent++;
+} else {
+if (++this.indentLevel * this.getIndentSpace () >= this.getLineLength ()) {
+this.offsetIndent++;
+--this.indentLevel;
+}}});
+Clazz.defineMethod (c$, "decrIndent", 
+function () {
+if (this.offsetIndent > 0) {
+--this.offsetIndent;
+} else {
+this.indentLevel--;
+}});
+Clazz.defineMethod (c$, "getIndentLevel", 
+function () {
+return this.indentLevel;
+});
+Clazz.defineMethod (c$, "indent", 
+function () {
+var max = this.getIndentLevel () * this.getIndentSpace ();
+if (this.indentChars == null || max > this.indentChars.length) {
+this.indentChars =  Clazz.newCharArray (max, '\0');
+for (var counter = 0; counter < max; counter++) {
+this.indentChars[counter] = ' ';
+}
+}var length = this.getCurrentLineLength ();
+var wasEmpty = this.isLineEmpty ();
+this.output (this.indentChars, 0, max);
+if (wasEmpty && length == 0) {
+this.$isLineEmpty = true;
+}});
+Clazz.defineMethod (c$, "write", 
+function (ch) {
+if (this.tempChars == null) {
+this.tempChars =  Clazz.newCharArray (128, '\0');
+}this.tempChars[0] = ch;
+this.write (this.tempChars, 0, 1);
+}, "~S");
+Clazz.defineMethod (c$, "write", 
+function (content) {
+if (content == null) {
+return;
+}var size = content.length;
+if (this.tempChars == null || this.tempChars.length < size) {
+this.tempChars =  Clazz.newCharArray (size, '\0');
+}content.getChars (0, size, this.tempChars, 0);
+this.write (this.tempChars, 0, size);
+}, "~S");
+Clazz.defineMethod (c$, "writeLineSeparator", 
+function () {
+var newline = this.getLineSeparator ();
+var length = newline.length;
+if (this.newlineChars == null || this.newlineChars.length < length) {
+this.newlineChars =  Clazz.newCharArray (length, '\0');
+}newline.getChars (0, length, this.newlineChars, 0);
+this.output (this.newlineChars, 0, length);
+this.setCurrentLineLength (0);
+});
+Clazz.defineMethod (c$, "write", 
+function (chars, startIndex, length) {
+if (!this.getCanWrapLines ()) {
+var lastIndex = startIndex;
+var endIndex = startIndex + length;
+var newlineIndex = this.indexOf (chars, '\u000a', startIndex, endIndex);
+while (newlineIndex != -1) {
+if (newlineIndex > lastIndex) {
+this.output (chars, lastIndex, newlineIndex - lastIndex);
+}this.writeLineSeparator ();
+lastIndex = newlineIndex + 1;
+newlineIndex = this.indexOf (chars, '\n', lastIndex, endIndex);
+}
+if (lastIndex < endIndex) {
+this.output (chars, lastIndex, endIndex - lastIndex);
+}} else {
+var lastIndex = startIndex;
+var endIndex = startIndex + length;
+var lineLength = this.getCurrentLineLength ();
+var maxLength = this.getLineLength ();
+while (lastIndex < endIndex) {
+var newlineIndex = this.indexOf (chars, '\u000a', lastIndex, endIndex);
+var needsNewline = false;
+var forceNewLine = false;
+lineLength = this.getCurrentLineLength ();
+if (newlineIndex != -1 && (lineLength + (newlineIndex - lastIndex)) < maxLength) {
+if (newlineIndex > lastIndex) {
+this.output (chars, lastIndex, newlineIndex - lastIndex);
+}lastIndex = newlineIndex + 1;
+forceNewLine = true;
+} else if (newlineIndex == -1 && (lineLength + (endIndex - lastIndex)) < maxLength) {
+if (endIndex > lastIndex) {
+this.output (chars, lastIndex, endIndex - lastIndex);
+}lastIndex = endIndex;
+} else {
+var breakPoint = -1;
+var maxBreak = Math.min (endIndex - lastIndex, maxLength - lineLength - 1);
+var counter = 0;
+while (counter < maxBreak) {
+if (Character.isWhitespace (chars[counter + lastIndex])) {
+breakPoint = counter;
+}counter++;
+}
+if (breakPoint != -1) {
+breakPoint += lastIndex + 1;
+this.output (chars, lastIndex, breakPoint - lastIndex);
+lastIndex = breakPoint;
+needsNewline = true;
+} else {
+counter = Math.max (0, maxBreak);
+maxBreak = endIndex - lastIndex;
+while (counter < maxBreak) {
+if (Character.isWhitespace (chars[counter + lastIndex])) {
+breakPoint = counter;
+break;
+}counter++;
+}
+if (breakPoint == -1) {
+this.output (chars, lastIndex, endIndex - lastIndex);
+breakPoint = endIndex;
+} else {
+breakPoint += lastIndex;
+if (chars[breakPoint] == '\u000a') {
+this.output (chars, lastIndex, breakPoint++ - lastIndex);
+forceNewLine = true;
+} else {
+this.output (chars, lastIndex, ++breakPoint - lastIndex);
+needsNewline = true;
+}}lastIndex = breakPoint;
+}}if (forceNewLine || needsNewline || lastIndex < endIndex) {
+this.writeLineSeparator ();
+if (lastIndex < endIndex || !forceNewLine) {
+this.indent ();
+}}}
+}}, "~A,~N,~N");
+Clazz.defineMethod (c$, "writeAttributes", 
+function (attr) {
+var names = attr.getAttributeNames ();
+while (names.hasMoreElements ()) {
+var name = names.nextElement ();
+this.write (" " + name + "=" + attr.getAttribute (name));
+}
+}, "javax.swing.text.AttributeSet");
+Clazz.defineMethod (c$, "output", 
+function (content, start, length) {
+this.getWriter ().write (content, start, length);
+this.setCurrentLineLength (this.getCurrentLineLength () + length);
+}, "~A,~N,~N");
+Clazz.defineMethod (c$, "indexOf", 
+ function (chars, sChar, startIndex, endIndex) {
+while (startIndex < endIndex) {
+if (chars[startIndex] == sChar) {
+return startIndex;
+}startIndex++;
+}
+return -1;
+}, "~A,~S,~N,~N");
+Clazz.defineStatics (c$,
+"NEWLINE", '\n');
+});