aboutsummaryrefslogtreecommitdiff
path: root/src/string_mutable.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/string_mutable.zig')
-rw-r--r--src/string_mutable.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/string_mutable.zig b/src/string_mutable.zig
index 249ab7394..755465b55 100644
--- a/src/string_mutable.zig
+++ b/src/string_mutable.zig
@@ -132,6 +132,10 @@ pub const MutableString = struct {
self.list.shrinkRetainingCapacity(0);
}
+ pub fn inflate(self: *MutableString, amount: usize) !void {
+ try self.list.resize(self.allocator, amount);
+ }
+
pub inline fn appendChar(self: *MutableString, char: u8) !void {
try self.list.append(self.allocator, char);
}