this.text = text;
- this.length = text.char_count();
+ this.length = text.length; // text.char_count();
this.cursor = 0;
}
{
if (n < 1) { //?? eof???
- return '\0';
+ return "\0";
}
- string pulled;
+ string pulled = "";
var i = 0;
while (i < n) {
if (this.cursor+i < this.length) {
- var add = this.text.get_char(this.cursor+i).to_string();
- pulled += add;
- i += add.length;
+ var add = this.text[this.cursor+i]; //this.text.get_char(this.cursor+i).to_string();
+ pulled += add.to_string();
+ i += 1;// add.length;
} else {
return "";