sheng-tool
    Preparing search index...

    Function countUtf16CodeUnits

    • 按 JavaScript / Kotlin String.length 的 UTF-16 code unit 语义统计字符串长度。

      Parameters

      • value: string

        被统计的字符串。

      Returns number

      UTF-16 code unit 数。

      0.2.0

      countUtf16CodeUnits('A😀𠮷B')  // 6