mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 20:11:17 +00:00
Fix String.replace not dropping temp mem.
This commit is contained in:
@@ -190,7 +190,7 @@ fn String join(Allocator allocator, String[] s, String joiner)
|
||||
@param [&inout] allocator : `The allocator to use for the String`
|
||||
@return "The new string with the elements replaced"
|
||||
*>
|
||||
fn String String.replace(self, Allocator allocator, String needle, String new_str) @nodiscard
|
||||
fn String String.replace(self, Allocator allocator, String needle, String new_str) @nodiscard => @pool()
|
||||
{
|
||||
Splitter s = self.tokenize_all(needle);
|
||||
DString d;
|
||||
|
||||
Reference in New Issue
Block a user