@nevware21/ts-utils
    Preparing search index...

    Function encodeAsHex

    • Encode a string as hexadecimal. Text containing characters above U+00FF is encoded as the UTF-8 byte order mark followed by its UTF-8 bytes, so it can be restored by the matching decode function. All other text is encoded as one byte per character.

      Parameters

      • value: string

        The string value to encode

      Returns string

      The hexadecimal encoded string

      0.13.0

      encodeAsHex("Hello"); // "48656c6c6f"
      encodeAsHex("A"); // "41"
      encodeAsHex(""); // ""
      encodeAsHex("€"); // "efbbbfe282ac"