* moved string-length to ikarus.strings

This commit is contained in:
Abdulaziz Ghuloum 2007-05-05 03:51:38 -04:00
parent 0675feac5c
commit 03318e61d9
3 changed files with 12 additions and 8 deletions

Binary file not shown.

View File

@ -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

View File

@ -1,11 +1,20 @@
(library (ikarus strings)
(export string-ref make-string)
(export string-length string-ref make-string)
(import
(except (ikarus) string-ref make-string)
(only (scheme) $string-ref $fx+ $fx= $fx<= $fx< $string-length
(except (ikarus) string-length string-ref make-string)
(only (scheme)
$fx+ $fx= $fx<= $fx< $string-length $string-ref
$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)
(unless (string? s)
(error 'string-ref "~s is not a string" s))