Function jsIndexToCharIndex

  • Convert a javascript string index into a unicode character offset

    Parameters

    • jsIdx: number

      The javascript string index (counting surrogate pairs)

    • text: string

      The text in which the offset is calculated

    Returns number

    The unicode character offset

Generated using TypeDoc