Next: Getters and setters, Up: rope transpose API [Contents][Index]
A multi-value function of a <rope-transpose> pointer to the leaf
of rope corresponding to index, and a new index for the
position of index inside the leaf itself.
(define r (cons->rope '(("La " . "vie ") .("est " . "ailleurs"))))
(rope-transpose-from-index r 8)
⇒ #<<rope-transpose> node: "est " … >
⇒ 1
Example 2.21: Obtaining a <rope-transpose> pointer from a given
index.
Notice that the ninth character of the string ‘La vie est ailleurs’
is the first of the string ‘est ’: the first value of
rope-transpose-from-index gives us a <rope-transpose>
pointer to the string and the second value is the local index in that
string.