\f
;;;; String slices
+(declare (integrate-operator slice?))
(define (slice? object)
(and (%record? object)
(fix:= 4 (%record-length object))
(define-integrable (slice-start slice) (%record-ref slice 2))
(define-integrable (slice-length slice) (%record-ref slice 3))
+(declare (integrate-operator slice-end))
(define (slice-end slice)
(fix:+ (slice-start slice) (slice-length slice)))
(define (slice-mutable? slice)
(ustring-mutable? (slice-string slice)))
+(declare (integrate-operator unpack-slice))
(define (unpack-slice string k)
(if (slice? string)
(k (slice-string string) (slice-start string) (slice-end string))
(k string 0 (ustring-length string))))
+(declare (integrate-operator translate-slice))
(define (translate-slice string start end k)
(if (slice? string)
(k (slice-string string)