scm: Add string-delete.
* module/srfi/srfi-13.mes (string-delete): New function.
This commit is contained in:
parent
6ffca4bf61
commit
5fae0f7bff
|
@ -58,3 +58,8 @@
|
|||
|
||||
(define (string-drop s n)
|
||||
(list->string (list-tail (string->list s) n)))
|
||||
|
||||
(define (string-delete pred s)
|
||||
(let ((p (if (procedure? pred) pred
|
||||
(lambda (c) (not (eq? pred c))))))
|
||||
(list->string (filter p (string->list s)))))
|
||||
|
|
Loading…
Reference in a new issue