• Convert a unicode character offset to a javascript string index.

    Parameters

    • charIdx: number

      The index in unicode characters

    • text: string

      The text in which the offset is calculated

    Returns number

    The js-native index