MCPcopy Create free account
hub / github.com/editablejs/editable / getCharOffsetForward

Function getCharOffsetForward

packages/editor/src/utils/text.ts:40–42  ·  view source on GitHub ↗
(text: string, offset: number)

Source from the content-addressed store, hash-verified

38 * @returns 向前的字符索引
39 */
40export const getCharOffsetForward = (text: string, offset: number) => {
41 return getCharFromGraphemeBreaker(text, offset).length || 1
42}
43
44/**
45 * 字形断路器

Callers 1

getCharRangeFunction · 0.85

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…