From 114e284566c69066c712c87671684e9839deb8a8 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Mon, 23 Oct 2017 13:39:04 +0000 Subject: [PATCH] string-length: return number of codepoints --- runtime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime.c b/runtime.c index dda093fa..863abab0 100644 --- a/runtime.c +++ b/runtime.c @@ -2081,7 +2081,7 @@ object Cyc_string_append(void *data, object cont, int _argc, object str1, ...) object Cyc_string_length(void *data, object str) { Cyc_check_str(data, str); - return obj_int2obj(string_len(str)); + return obj_int2obj(string_num_cp(str)); } object Cyc_string_set(void *data, object str, object k, object chr)