core: Remove string_length.
* module/mes/scm.mes (string-length): New function.
This commit is contained in:
parent
be786c00a3
commit
9e6d862c5b
|
@ -188,6 +188,9 @@
|
||||||
|
|
||||||
|
|
||||||
;;; Strings/srfi-13
|
;;; Strings/srfi-13
|
||||||
|
(define (string-length s)
|
||||||
|
(length (string->list s)))
|
||||||
|
|
||||||
(define (string-ref s k)
|
(define (string-ref s k)
|
||||||
(list-ref (string->list s) k))
|
(list-ref (string->list s) k))
|
||||||
|
|
||||||
|
|
7
string.c
7
string.c
|
@ -18,13 +18,6 @@
|
||||||
* along with Mes. If not, see <http://www.gnu.org/licenses/>.
|
* along with Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
SCM
|
|
||||||
string_length (SCM x)
|
|
||||||
{
|
|
||||||
assert (TYPE (x) == STRING);
|
|
||||||
return MAKE_NUMBER (VALUE (length (STRING (x))));
|
|
||||||
}
|
|
||||||
|
|
||||||
SCM
|
SCM
|
||||||
substring (SCM x) ///((arity . n))
|
substring (SCM x) ///((arity . n))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue