1 //<script type="text/javscript">
4 imports['Object.js'].load(Object);
6 JSDOC = imports['JSDOC.js'].JSDOC;
11 TextStream = function(text) {
12 if (typeof(text) == "undefined") text = "";
18 Object.extend( TextStream.prototype, {
21 if (typeof n == "undefined") n = 0;
23 if (this.cursor+n < 0 || this.cursor+n >= this.text.length) {
24 var result = new String("");
28 return this.text.charAt(this.cursor+n);
32 if (typeof n == "undefined") n = 1;
33 if (n < 1) return null;
36 for (var i = 0; i < n; i++) {
37 if (this.cursor+i < this.text.length) {
38 pulled += this.text.charAt(this.cursor+i);
41 var result = new String("");