* Checks if the input at the given offset matches the given string.
(input: InputStream, offset: number, str: string)
| 49 | * Checks if the input at the given offset matches the given string. |
| 50 | */ |
| 51 | function matchesStringAt(input: InputStream, offset: number, str: string): boolean { |
| 52 | for (let i = 0; i < str.length; i++) { |
| 53 | if (input.peek(offset + i) !== str.charCodeAt(i)) { |
| 54 | return false; |
| 55 | } |
| 56 | } |
| 57 | return true; |
| 58 | } |
| 59 | |
| 60 | /** |
| 61 | * Checks if current position starts with "or" that will be recognized as the OR operator. |
no outgoing calls
no test coverage detected