string-set! -- r7rs Definition mutator!;
string-set! (from vonuvoli);Procedure variants:
((string-not-empty range-offset character) -> (undefined))
string-not-empty;range-offset;character;undefined;scheme:base -- (scheme base);scheme -- (scheme);(string-set! string k char)Domain: It is an error if
kis not a valid index ofstring.The
string-set!procedure storescharin elementkofstring. There is no requirement for this procedure to execute in constant time.(define (f) (make-string 3 #\*)) (define (g) "***") (string-set! (f) 0 #\?) ===> #unspecified (string-set! (g) 0 #\?) ===> #error (string-set! (symbol->string 'immutable) 0 #\?) ===> #errorNote: There is no requirement for this procedure to execute in constant time.
The text herein was sourced and adapted as described in the "R7RS attribution of various text snippets" appendix.