mirror of
https://github.com/oven-sh/bun
synced 2026-02-12 11:59:00 +00:00
[bun install] Implement bunfig.toml config
This commit is contained in:
@@ -30,3 +30,14 @@ pub fn append(this: *StringBuilder, slice: string) string {
|
||||
assert(this.len <= this.cap);
|
||||
return result;
|
||||
}
|
||||
|
||||
const std = @import("std");
|
||||
pub fn fmt(this: *StringBuilder, comptime str: string, args: anytype) string {
|
||||
assert(this.len <= this.cap); // didn't count everything
|
||||
assert(this.ptr != null); // must call allocate first
|
||||
|
||||
var buf = this.ptr.?[this.len..this.cap];
|
||||
const out = std.fmt.bufPrint(buf, str, args) catch unreachable;
|
||||
this.len += out.len;
|
||||
return out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user