mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Update string.c3
This commit is contained in:
@@ -304,8 +304,8 @@ private fn void String.reserve(String* str, usz addition)
|
||||
|
||||
fn String String.new_concat(String a, String b, Allocator* allocator = mem::current_allocator())
|
||||
{
|
||||
String resultString = new_with_capacity(a.len() + b.len(), allocator);
|
||||
resultString.append(a);
|
||||
resultString.append(b);
|
||||
return resultString;
|
||||
String string = new_with_capacity(a.len() + b.len(), allocator);
|
||||
string.append(a);
|
||||
string.append(b);
|
||||
return string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user