Add string-take, string-drop.
* module/srfi/srfi-13.mes (string-take, string-drop): New functions.
This commit is contained in:
parent
c3a6d70f74
commit
a0baa98196
|
@ -52,3 +52,9 @@
|
|||
(loop (cdr rest)
|
||||
(append result
|
||||
(list (list->string (list-head lst (- (length lst) (length rest)))))))))))
|
||||
|
||||
(define (string-take s n)
|
||||
(list->string (list-head (string->list s) n)))
|
||||
|
||||
(define (string-drop s n)
|
||||
(list->string (list-tail (string->list s) n)))
|
||||
|
|
Loading…
Reference in a new issue