mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 11:29:02 +00:00
@@ -23,6 +23,11 @@ pub const MutableString = struct {
|
||||
try self.list.ensureUnusedCapacity(self.allocator, amount);
|
||||
}
|
||||
|
||||
pub fn write(self: *MutableString, bytes: anytype) !usize {
|
||||
try self.list.appendSlice(self.allocator, bytes);
|
||||
return bytes.len;
|
||||
}
|
||||
|
||||
pub fn writeAll(self: *MutableString, bytes: string) !usize {
|
||||
try self.list.appendSlice(self.allocator, bytes);
|
||||
return self.list.items.len;
|
||||
|
||||
Reference in New Issue
Block a user