platform-bible-utils
    Preparing search index...

    Function charAt

    • This function mirrors the charAt function from the JavaScript Standard String object. It operates on grapheme clusters instead of UTF-16 code units.

      Returns the single grapheme cluster at the given index.

      Parameters

      • string: string

        String to index

      • index: number

        Position of the grapheme cluster to return. Unlike at, a negative index is out of bounds rather than counted from the end

      Returns string

      The grapheme cluster at the given index, or an empty string if the index is out of bounds