Function strtabStringFmt [src]
Prototype
pub fn strtabStringFmt(self: *Builder, comptime fmt_str: []const u8, fmt_args: anytype) Allocator.Error!StrtabString
Parameters
self: *Builder
fmt_str: []const u8
Source
pub fn strtabStringFmt(self: *Builder, comptime fmt_str: []const u8, fmt_args: anytype) Allocator.Error!StrtabString {
try self.strtab_string_map.ensureUnusedCapacity(self.gpa, 1);
try self.strtab_string_bytes.ensureUnusedCapacity(self.gpa, @intCast(std.fmt.count(fmt_str, fmt_args)));
try self.strtab_string_indices.ensureUnusedCapacity(self.gpa, 1);
return self.strtabStringFmtAssumeCapacity(fmt_str, fmt_args);
}