decode ( byte-array encoding -- string )
Factor handbook » Input and output » I/O encodings » Encoding and decoding strings

Prev:encode ( string encoding -- byte-array )


Vocabulary
io.encodings.string

Inputs
byte-arraya byte-array
encodingan encoding descriptor


Outputs
stringa string


Word description
Converts an array of bytes to a string, interpreting that array of bytes as a string with the given encoding.

Examples
USING: io.encodings.string io.encodings.utf8 prettyprint ; B{ 230 136 145 231 136 177 228 189 160 } utf8 decode .
"我爱你"


Definition