pub fn addString(wip: *Wip, s: []const u8) Allocator.Error!String wip: *Wips: []const u8418
419
420
421
422
423
424
425 pub fn addString(wip: *Wip, s: []const u8) Allocator.Error!String {
const gpa = wip.gpa;
const index: String = @intCast(wip.string_bytes.items.len);
try wip.string_bytes.ensureUnusedCapacity(gpa, s.len + 1);
wip.string_bytes.appendSliceAssumeCapacity(s);
wip.string_bytes.appendAssumeCapacity(0);
return index;
}