31.5.7. Converting between strings and byte vectors
Encodings can also be used to convert directly between strings and their corresponding byte vector representation according to that encoding.
(EXT:CONVERT-STRING-FROM-BYTES vector encoding &KEY :START :END)
converts the subsequence of vector (a (VECTOR (UNSIGNED-BYTE 8))
) from start to end to a STRING, according to the given encoding, and returns the resulting string.
(EXT:CONVERT-STRING-TO-BYTES string encoding &KEY :START :END)
converts the subsequence of string from start to end to a (VECTOR (UNSIGNED-BYTE 8))
, according to the given encoding, and returns the resulting byte vector.