1 //<script type="text/javscript">
3 JSDOC = imports['JSDOC.js'].JSDOC;
4 Roo = imports['Roo.js'].Roo;
11 TextStream = function(text) {
12 if (typeof(text) == "undefined") text = "";
18 Roo.apply( 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("");