1 //<script type="text/javscript">
3 XObject = imports.XObject.XObject;
11 TextStream = XObject.define(
13 if (typeof(text) == "undefined") text = "";
22 if (typeof n == "undefined") n = 0;
24 if (this.cursor+n < 0 || this.cursor+n >= this.text.length) {
25 var result = new String("");
29 return this.text.charAt(this.cursor+n);
33 if (typeof n == "undefined") n = 1;
34 if (n < 1) return null;
37 for (var i = 0; i < n; i++) {
38 if (this.cursor+i < this.text.length) {
39 pulled += this.text.charAt(this.cursor+i);
42 var result = new String("");