@s2-dev/streamstore - v0.22.0
    Preparing search index...

    Function utf8ByteLength

    • Calculate the UTF-8 byte length of a string. Handles all Unicode characters including surrogate pairs correctly.

      Parameters

      • str: string

        The string to measure

      Returns number

      The byte length when encoded as UTF-8