platform-bible-utils
    Preparing search index...

    Function stringLength

    • This function mirrors the length property from the JavaScript Standard String object. It counts grapheme clusters instead of UTF-16 code units. Since length appears to be a reserved keyword, the function was renamed to stringLength.

      Counts as a literate reader of the script would, including for pointed Hebrew, vocalized Arabic and Syriac, Indic conjuncts, Thai, and decomposed Hangul Jamo. \r\n counts as one.

      Parameters

      • string: string

        String to return the length for

      Returns number

      Number of grapheme clusters in the string