WLJS LogoWLJS Notebook

StringToByteArray

StringToByteArray["string"] returns a byte array corresponding to the UTF-8 encoding of the specified string.

  • StringToByteArray["string", "encoding"] uses the specified character encoding.

Examples

UTF-8 encoding:

StringToByteArray["Hello"]

With different encoding:

StringToByteArray["Hello", "ASCII"]

Unicode characters:

StringToByteArray["你好"]

Please visit the official Wolfram Language Reference for more details.

On this page