MCPcopy
hub / github.com/DHTMLX/gantt / skipExtendingChars

Function skipExtendingChars

samples/common/codehighlight/codemirror.js:292–295  ·  view source on GitHub ↗
(str, pos, dir)

Source from the content-addressed store, hash-verified

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`

Callers 2

coordsCharInnerFunction · 0.85
moveCharLogicallyFunction · 0.85

Calls 1

isExtendingCharFunction · 0.85

Tested by

no test coverage detected