(condition, input, position)
| 4235 | var assert = require("node:assert"); |
| 4236 | var { utf8DecodeBytes } = require_encoding(); |
| 4237 | function collectASequenceOfCodePoints(condition, input, position) { |
| 4238 | let result = ""; |
| 4239 | while (position.position < input.length && condition(input[position.position])) { |
| 4240 | result += input[position.position]; |
| 4241 | position.position++; |
| 4242 | } |
| 4243 | return result; |
| 4244 | } |
| 4245 | __name(collectASequenceOfCodePoints, "collectASequenceOfCodePoints"); |
| 4246 | function collectASequenceOfCodePointsFast(char, input, position) { |
| 4247 | const idx = input.indexOf(char, position.position); |
no test coverage detected