| 338 | }; |
| 339 | |
| 340 | const nextText = (numChars: number) => { |
| 341 | let len = 0; |
| 342 | const assem = new StringAssembler(); |
| 343 | const firstString = linesGet(curLine).substring(curChar); |
| 344 | len += firstString.length; |
| 345 | assem.append(firstString); |
| 346 | |
| 347 | let lineNum = curLine + 1; |
| 348 | |
| 349 | while (len < numChars) { |
| 350 | const nextString = linesGet(lineNum); |
| 351 | len += nextString.length; |
| 352 | assem.append(nextString); |
| 353 | lineNum++; |
| 354 | } |
| 355 | |
| 356 | return assem.toString().substring(0, numChars); |
| 357 | }; |
| 358 | |
| 359 | const cachedStrFunc = (func:Function) => { |
| 360 | const cache:MapArrayType<any> = {}; |