utf8->string -- r7rs Definition converter;
utf8->string (from vonuvoli);Procedure variants:
((bytevector-empty) -> (string-empty))
bytevector-empty;string-empty;((bytevector-not-empty) -> (string-not-empty))
bytevector-not-empty;string-not-empty;((bytevector range-start) -> (string))
bytevector;range-start;string;((bytevector range-start range-end) -> (string))
bytevector;range-start;range-end;string;scheme:base -- (scheme base);scheme -- (scheme);(utf8->string bytevector) (utf8->string bytevector start) (utf8->string bytevector start end) (string->utf8 string) (string->utf8 string start) (string->utf8 string start end)Domain: It is an error for
bytevectorto contain invalid UTF-8 byte sequences.These procedures translate between strings and bytevectors that encode those strings using the UTF-8 encoding. The
utf8->stringprocedure decodes the bytes of a bytevector betweenstartandendand returns the corresponding string; thestring->utf8procedure encodes the characters of a string betweenstartandendand returns the corresponding bytevector.(utf8->string #u8(#x41)) ===> "A" (string->utf8 "λ") ===> #u8(#xCE #xBB)
The text herein was sourced and adapted as described in the "R7RS attribution of various text snippets" appendix.
bytevector-empty;string-empty;bytevector-not-empty;string-not-empty;bytevector;range-start;string;range-end;