From 9e6d862c5b541b721dd89fb13eca502359704b9b Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Fri, 23 Dec 2016 21:26:16 +0100 Subject: [PATCH] core: Remove string_length. * module/mes/scm.mes (string-length): New function. --- module/mes/scm.mes | 3 +++ string.c | 7 ------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/module/mes/scm.mes b/module/mes/scm.mes index 58659ff1..646c95ab 100644 --- a/module/mes/scm.mes +++ b/module/mes/scm.mes @@ -188,6 +188,9 @@ ;;; Strings/srfi-13 +(define (string-length s) + (length (string->list s))) + (define (string-ref s k) (list-ref (string->list s) k)) diff --git a/string.c b/string.c index 5883b9f0..9b489373 100644 --- a/string.c +++ b/string.c @@ -18,13 +18,6 @@ * along with Mes. If not, see . */ -SCM -string_length (SCM x) -{ - assert (TYPE (x) == STRING); - return MAKE_NUMBER (VALUE (length (STRING (x)))); -} - SCM substring (SCM x) ///((arity . n)) {