Next: , Previous: Transcripts, Up: Standards Support


7.4.4 Rev2 Procedures

(require 'rev2-procedures) The procedures below were specified in the Revised^2 Report on Scheme. N.B.: The symbols 1+ and -1+ are not R4RS syntax. Scheme->C, for instance, chokes on this module.

— Procedure: substring-move-left! string1 start1 end1 string2 start2
— Procedure: substring-move-right! string1 start1 end1 string2 start2

string1 and string2 must be a strings, and start1, start2 and end1 must be exact integers satisfying

          0 <= start1 <= end1 <= (string-length string1)
          0 <= start2 <= end1 - start1 + start2 <= (string-length string2)

substring-move-left! and 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.

— Procedure: substring-fill! string start end char

Fills the elements startend of string with the character char.

— Function: string-null? str

== (= 0 (string-length str))

— Procedure: append! pair1 ...

Destructively appends its arguments. Equivalent to nconc.

— Function: 1+ n

Adds 1 to n.

— Function: -1+ n

Subtracts 1 from n.

— Function: <?
— Function: <=?
— Function: =?
— Function: >?
— Function: >=?

These are equivalent to the procedures of the same name but without the trailing ‘?’.