mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-09 22:17:34 +02:00
Adding string-offset->index.
This commit is contained in:
parent
beb325a0d1
commit
4ffa62d4ef
1 changed files with 4 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue