1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

builtin: make string.add() public temporarily till -autofree improves

This commit is contained in:
Delyan Angelov 2021-03-23 20:20:53 +02:00
parent 419ee8ae2a
commit d098a3caca
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -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) }