string->vector(3scm) Scheme Programmer's Manual string->vector(3scm)

string->vector - convert a string to a vector

(import (scheme base))              ;R7RS

(string->vector string)
(string->vector string start)
(string->vector string start end)

Returns a newly created vector initialized to the elements of string between start (inclusive) and end (exclusive). The order of the characters is preserved. If omitted, start defaults to 0 and end defaults to the length of string.

Returns a single value; a vector object.

(string->vector "ABC")  =>  #(#\A #\B #\C)

It is an error to pass the wrong number of arguments, and to pass an argument that is outside its domain. Implementations may signal an error, extend the procedure's domain of definition to include such arguments, or fail catastrophically.

string->list(3scm)

R7RS, SRFI-133, SRFI-140, SRFI-152

This procedure first appeared in R7RS.

This page is part of the scheme-manpages project. It includes materials from the RnRS documents. More information can be found at https://weinholt.se/scheme/manpages/.

2022-05-14