1 //<script type="text/javscript">
3 XObject = imports.XObject.XObject;
9 TextStream = XObject.define(
11 if (typeof(text) == "undefined") text = "";
20 if (typeof n == "undefined") n = 0;
22 if (this.cursor+n < 0 || this.cursor+n >= this.text.length) {
23 var result = new String("");
27 return this.text.charAt(this.cursor+n);
31 if (typeof n == "undefined") n = 1;
32 if (n < 1) return null;
35 for (var i = 0; i < n; i++) {
36 if (this.cursor+i < this.text.length) {
37 pulled += this.text.charAt(this.cursor+i);
40 var result = new String("");