public string readutil(FuncCharIn stop) { List <char> chars = new List <char>(); while (this.pos < this.length) { char c = this.peek(this.pos); if (stop(c)) { break; } this.readchar(); chars.Add(c); } return(new string (chars.ToArray())); }
public string peekutil(FuncCharIn stop) { List <char> chars = new List <char>(); int pos = this.pos; while (pos < this.length) { char c = this.peek(pos); if (stop(c)) { break; } pos++; chars.Add(c); } return(new string (chars.ToArray())); }