diff --git a/src/ikarus.boot b/src/ikarus.boot index eec14c8..6f5e231 100644 Binary files a/src/ikarus.boot and b/src/ikarus.boot differ diff --git a/src/ikarus.io.output-strings.ss b/src/ikarus.io.output-strings.ss index 151afbe..891e77f 100644 --- a/src/ikarus.io.output-strings.ss +++ b/src/ikarus.io.output-strings.ss @@ -33,10 +33,6 @@ (match-and-bind targs (msg-arg* ...) (begin b b* ...))] ... [else else1 else2 ...]))])) - (define string-copy - (lambda (s) - (substring s 0 (string-length s)))) - (define concat-old (lambda (str i ls) (let ([n (sum i ls)]) diff --git a/src/ikarus.strings.ss b/src/ikarus.strings.ss index 8930769..a810f4f 100644 --- a/src/ikarus.strings.ss +++ b/src/ikarus.strings.ss @@ -1,7 +1,8 @@ (library (ikarus strings) (export string-length string-ref string-set! make-string string->list string=? - string-append substring string list->string uuid) + string-append substring string list->string uuid + string-copy) (import (ikarus system $strings) (ikarus system $fx) @@ -10,7 +11,7 @@ (ikarus system $pairs) (except (ikarus) string-length string-ref string-set! make-string string->list string=? string-append substring string - list->string uuid)) + list->string uuid string-copy)) (define string-length @@ -117,6 +118,12 @@ "" (fill s ($make-string len) n m 0))))))) + (define string-copy + (lambda (s) + (if (string? s) + (substring s 0 (string-length s)) + (error 'string-copy "~s is not a string" s)))) + (module (string=?) (define bstring=? (lambda (s1 s2 i j) diff --git a/src/makefile.ss b/src/makefile.ss index 3aa92bb..8921525 100755 --- a/src/makefile.ss +++ b/src/makefile.ss @@ -235,9 +235,9 @@ [and i r] [or i r] [... i r] - [=> i r] - [else i r] - [_ i r] + [=> i r] + [else i r] + [_ i r] )) (define ikarus-procedures-map @@ -331,6 +331,7 @@ [string=? i r] [string-ci=? i unicode] [substring i r] + [string-copy i r] [string-append i r] [string->list i r] [list->string i r] diff --git a/src/todo-r6rs.ss b/src/todo-r6rs.ss index 78e59c1..dea2397 100755 --- a/src/todo-r6rs.ss +++ b/src/todo-r6rs.ss @@ -203,7 +203,7 @@ [string->number C ba] [string->symbol C ba] [string-append C ba] - [string-copy S ba] + [string-copy C ba] [string-for-each S ba] [string-length C ba] [string-ref C ba] @@ -231,9 +231,9 @@ [vector? C ba] [zero? C ba] [... C ba sc] - [=> S ba ex] - [_ S ba sc] - [else S ba ex] + [=> C ba ex] + [_ C ba sc] + [else C ba ex] [bitwise-and D bw] [bitwise-arithmetic-shift D bw]