From d098a3cacae24ddda1c64f815f0e3e9c3d52653d Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Tue, 23 Mar 2021 20:20:53 +0200 Subject: [PATCH] builtin: make string.add() public temporarily till -autofree improves --- vlib/builtin/string.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/builtin/string.v b/vlib/builtin/string.v index 337bea5e5b..0afcc4c774 100644 --- a/vlib/builtin/string.v +++ b/vlib/builtin/string.v @@ -500,7 +500,7 @@ fn (s string) ge(a string) bool { // TODO `fn (s string) + (a string)` ? To be consistent with operator overloading syntax. // add concatenates string with the string given in `s`. -fn (s string) add(a string) string { +pub fn (s string) add(a string) string { new_len := a.len + s.len mut res := string{ str: unsafe { malloc(new_len + 1) }