(str, pos, dir)
| 290 | |
| 291 | // Returns a number from the range [`0`; `str.length`] unless `pos` is outside that range. |
| 292 | function skipExtendingChars(str, pos, dir) { |
| 293 | while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; } |
| 294 | return pos |
| 295 | } |
| 296 | |
| 297 | // Returns the value from the range [`from`; `to`] that satisfies |
| 298 | // `pred` and is closest to `from`. Assumes that at least `to` |
no test coverage detected