From b7597fbd8a4dcf5e69c2f94166300b4d84d037b8 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sun, 11 May 2008 17:43:34 -0500 Subject: [PATCH] add strlen --- core/libc/libc.factor | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/libc/libc.factor b/core/libc/libc.factor index 756d29e551..70850a2894 100755 --- a/core/libc/libc.factor +++ b/core/libc/libc.factor @@ -73,3 +73,6 @@ PRIVATE> : with-malloc ( size quot -- ) swap 1 calloc [ swap keep ] [ free ] [ ] cleanup ; inline + +: strlen ( alien -- len ) + "size_t" "libc" "strlen" { "char*" } alien-invoke ;