Skip to content
Chris Petersen edited this page Oct 16, 2014 · 1 revision

u8vector->string converts a u8vector to string. Terminates string at first #\0

Parameter Description
vec u8vector to be converted

Example

Example 1: Transfer a string to u8vector and back.

> (define str "Once upon a time there was a little cow.")
> (define vec (string->u8vector str))
> (display vec)
#u8(79 110 99 101 32 117 112 111 110 32 97 32 116 105 109 101 32 116 104 101 114 101 32 119 97 115 32 97 32 108 105 116 116 108 101 32 99 111 119 46)
> (u8vector->string vec)
"Once upon a time there was a little cow."
Clone this wiki locally