1 //<script type="text/javscript">
10 public class TextStreamChar : Object {
13 public TextStreamChar(char val, bool eof=false) {
19 public class TextStream : Object {
25 public TextStream (string text = "")
30 this.length = text.char_count()
34 public char look(int n = 0)
37 if (this.cursor+n < 0 || this.cursor+n >= this.length) {
40 return this.get_char(this.cursor+n);
43 public bool lookEOF(int n = 0)
45 if (this.cursor+n < 0 || this.cursor+n >= this.length)) {
52 * @param n - number of characters to return..
54 public string next(int n = 1)
57 if (n < 1) { //?? eof???
64 if (this.cursor+i < this.length) {
65 pulled += this.text.get_char(this.cursor+i);
66 i += pulled.to_string.length();