(char: string)
| 51 | } |
| 52 | |
| 53 | function isAlpha(char: string): boolean { |
| 54 | if (!char) return false; |
| 55 | const code = char.charCodeAt(0); |
| 56 | return ( |
| 57 | (code >= 65 && code <= 90) || // A-Z |
| 58 | (code >= 97 && code <= 122) |
| 59 | ); |
| 60 | } |
| 61 | |
| 62 | function charAt(doc: Text, index: number): string { |
| 63 | if (index < 0 || index >= doc.length) return ""; |