(guile.info.gz) String Modification
Info Catalog
(guile.info.gz) String Selection
(guile.info.gz) Strings
(guile.info.gz) String Comparison
21.4.6 String Modification
--------------------------
These procedures are for modifying strings in-place. This means that
the result of the operation is not a new string; instead, the original
string's memory representation is modified.
-- Scheme Procedure: string-set! str k chr
-- C Function: scm_string_set_x (str, k, chr)
Store CHR in element K of STR and return an unspecified value. K
must be a valid index of STR.
-- Scheme Procedure: string-fill! str chr
-- C Function: scm_string_fill_x (str, chr)
Store CHAR in every element of the given STRING and return an
unspecified value.
-- Scheme Procedure: substring-fill! str start end fill
-- C Function: scm_substring_fill_x (str, start, end, fill)
Change every character in STR between START and END to FILL.
(define y "abcdefg")
(substring-fill! y 1 3 #\r)
y
=> "arrdefg"
-- Scheme Procedure: substring-move! str1 start1 end1 str2 start2
-- C Function: scm_substring_move_x (str1, start1, end1, str2, start2)
Copy the substring of STR1 bounded by START1 and END1 into STR2
beginning at position START2. STR1 and STR2 can be the same
string.
Info Catalog
(guile.info.gz) String Selection
(guile.info.gz) Strings
(guile.info.gz) String Comparison
automatically generated byinfo2html