mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
Adding missing string-cursor utilities for non-Chibi implementations.
This commit is contained in:
parent
6f57182633
commit
eca3895a00
1 changed files with 4 additions and 1 deletions
|
@ -28,7 +28,7 @@
|
|||
(else
|
||||
(begin
|
||||
(define (string-start-arg s o)
|
||||
(if (pair? o) (string-index->offset (car o)) 0))
|
||||
(if (pair? o) (string-index->offset s (car o)) 0))
|
||||
(define (string-end-arg s o)
|
||||
(if (pair? o) (string-index->offset (car o)) (string-length s)))
|
||||
(define string-cursor=? =)
|
||||
|
@ -37,8 +37,11 @@
|
|||
(define string-cursor>? >)
|
||||
(define string-cursor>=? >=)
|
||||
(define string-cursor-ref string-ref)
|
||||
(define (string-cursor-next s i) (+ i 1))
|
||||
(define (string-cursor-prev s i) (- i 1))
|
||||
(define substring-cursor substring)
|
||||
(define (string-offset->index str off) off)
|
||||
(define (string-index->offset str i) i)
|
||||
(define (string-concatenate-reverse ls)
|
||||
(apply string-append (reverse ls))))))
|
||||
(include "regexp.scm"))
|
||||
|
|
Loading…
Add table
Reference in a new issue