A tool for [converting][convert] a sorted series of code-point offsets in a [text] to JavaScript string character offsets.

Constructors

Methods

Constructors

Methods

  • Converts a codepoint offset in [text] to a JS-char-based-offset.

    Parameters

    • codepointOffset: number

      The offset in code points.

    Returns number

    RangeError if the [codepointOffset] is out of bounds of [text], or when its value in this call is smaller than in the previous call.