diff --git a/lib/init-7.scm b/lib/init-7.scm index 83ed8d6f..748e7821 100644 --- a/lib/init-7.scm +++ b/lib/init-7.scm @@ -1199,9 +1199,12 @@ (cond-expand (full-unicode - (define string-cursor-end string-size)) + (define string-cursor-end string-size) + (define (string-offset->index str off) + (string-length (substring-cursor str 0 off)))) (else (define (string-index->offset str i) i) + (define (string-offset->index str off) off) (define string-size string-length) (define substring-cursor substring) (define string-cursor-end string-length)