(cond ((not char) #f)
((eof-object? char) (fix:- index start))
(else
- (xstring-set! string index char)
+ (ustring-set! string index char)
(loop (fix:+ index 1)))))
(fix:- end start))))
(let ((ob (port-output-buffer port)))
(let loop ((index start))
(if (fix:< index end)
- (let ((n (write-next-char ob (xstring-ref string index))))
+ (let ((n (write-next-char ob (ustring-ref string index))))
(cond ((and n (fix:> n 0)) (loop (fix:+ index 1)))
((fix:< start index) (fix:- index start))
(else n)))