From ffa72961f684c0ceb2faebf12f48ba925ec19957 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Thu, 21 May 2026 11:14:14 +0200 Subject: [PATCH] Replaced loop with mem.copy --- lib/c/string.q | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/c/string.q b/lib/c/string.q index bf95f12..b61cc0e 100644 --- a/lib/c/string.q +++ b/lib/c/string.q @@ -2,10 +2,6 @@ import mem string(s string) -> !string { cstr := mem.alloc(s.len + 1) - - loop i := 0..s.len { - cstr[i] = s[i] - } - + mem.copy(cstr, s) return cstr } \ No newline at end of file -- 2.51.2