From 688c05568fa2fad08e40c657ca8eebbcceb7edb0 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 3 Mar 2017 20:32:17 -0800 Subject: [PATCH] Document string->vector and vector->string. --- doc/ref-manual/vectors.texi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/ref-manual/vectors.texi b/doc/ref-manual/vectors.texi index 8833e2025..fc364a5bc 100644 --- a/doc/ref-manual/vectors.texi +++ b/doc/ref-manual/vectors.texi @@ -102,6 +102,24 @@ Returns a newly allocated vector initialized to the elements of @end example @end deffn +@deffn {standard procedure} string->vector string [start [end]] +@deffnx {standard procedure} vector->string vector [start [end]] +It is an error if any element of @var{vector} is not a character. + +The @code{vector->string} procedure returns a newly allocated string +of the objects contained in the elements of @var{vector} between +@var{start} and @var{end}. The @code{string->vector} procedure +returns a newly created vector initialized to the elements of the +string @var{string} between @var{start} and @var{end}. + +In both procedures, order is preserved. + +@example +(string->vector "ABC") @result{} #(#\A #\B #\C) +(vector->string #(#\1 #\2 #\3) @result{} "123" +@end example +@end deffn + @deffn procedure make-initialized-vector k initialization Similar to @code{make-vector}, except that the elements of the result are determined by calling the procedure @var{initialization} on the -- 2.25.1