The procedures below were specified in the Revised^2 Report on
Scheme. N.B.: The symbols
-1+ are not
R4RS syntax. Scheme->C, for instance, chokes on this
string1 and string2 must be a strings, and start1, start2 and end1 must be exact integers satisfying0 <= start1 <= end1 <= (string-length string1) 0 <= start2 <= end1 - start1 + start2 <= (string-length string2)
substring-move-right!store characters of string1 beginning with index start1 (inclusive) and ending with index end1 (exclusive) into string2 beginning with index start2 (inclusive).
substring-move-left!stores characters in time order of increasing indices.
substring-move-right!stores characters in time order of increasing indeces.
Fills the elements start–end of string with the character char.