* A faster collectASequenceOfCodePoints that only works when comparing a single character. * @param {string} char * @param {string} input * @param {{ position: number }} position * @returns {string}
(char, input, position)
| 162 | * @returns {string} |
| 163 | */ |
| 164 | function collectASequenceOfCodePointsFast(char, input, position) { |
| 165 | const idx = StringPrototypeIndexOf(input, char, position.position); |
| 166 | const start = position.position; |
| 167 | |
| 168 | if (idx === -1) { |
| 169 | position.position = input.length; |
| 170 | return StringPrototypeSlice(input, start); |
| 171 | } |
| 172 | |
| 173 | position.position = idx; |
| 174 | return StringPrototypeSlice(input, start, position.position); |
| 175 | } |
| 176 | |
| 177 | // https://url.spec.whatwg.org/#string-percent-decode |
| 178 | /** |
no outgoing calls
no test coverage detected
searching dependent graphs…