* moved string-length to ikarus.strings
This commit is contained in:
parent
0675feac5c
commit
03318e61d9
BIN
src/ikarus.boot
BIN
src/ikarus.boot
Binary file not shown.
|
@ -72,11 +72,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(primitive-set! 'string-length
|
|
||||||
(lambda (x)
|
|
||||||
(unless (string? x)
|
|
||||||
(error 'string-length "~s is not a string" x))
|
|
||||||
($string-length x)))
|
|
||||||
|
|
||||||
|
|
||||||
(primitive-set! 'string->list
|
(primitive-set! 'string->list
|
||||||
|
|
|
@ -1,11 +1,20 @@
|
||||||
|
|
||||||
(library (ikarus strings)
|
(library (ikarus strings)
|
||||||
(export string-ref make-string)
|
(export string-length string-ref make-string)
|
||||||
(import
|
(import
|
||||||
(except (ikarus) string-ref make-string)
|
(except (ikarus) string-length string-ref make-string)
|
||||||
(only (scheme) $string-ref $fx+ $fx= $fx<= $fx< $string-length
|
(only (scheme)
|
||||||
|
$fx+ $fx= $fx<= $fx< $string-length $string-ref
|
||||||
$make-string $string-set!))
|
$make-string $string-set!))
|
||||||
|
|
||||||
|
|
||||||
|
(define string-length
|
||||||
|
(lambda (x)
|
||||||
|
(unless (string? x)
|
||||||
|
(error 'string-length "~s is not a string" x))
|
||||||
|
($string-length x)))
|
||||||
|
|
||||||
|
|
||||||
(define (string-ref s i)
|
(define (string-ref s i)
|
||||||
(unless (string? s)
|
(unless (string? s)
|
||||||
(error 'string-ref "~s is not a string" s))
|
(error 'string-ref "~s is not a string" s))
|
||||||
|
|
Loading…
Reference in New Issue