From 0892d84c17cbde40d79e09dfb8e35d47ac7f5eb1 Mon Sep 17 00:00:00 2001 From: Jon Lipstate Date: Sat, 25 Mar 2023 23:55:37 -0700 Subject: [PATCH] corrected bprint --- core/fmt/fmt.odin | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/fmt/fmt.odin b/core/fmt/fmt.odin index d3ef777fc..d0074ebe1 100644 --- a/core/fmt/fmt.odin +++ b/core/fmt/fmt.odin @@ -208,10 +208,10 @@ tprintf :: proc(fmt: string, args: ..any) -> string { sbprintf(&str, fmt, ..args) return strings.to_string(str) } -// Creates a formatted string using a buffer from an array +// Creates a formatted string using a supplied buffer as the backing array. Writes into the buffer. // // Inputs: -// - buf: The source buffer +// - buf: The backing buffer // - args: A variadic list of arguments to be formatted // - sep: An optional separator string (default is a single space) // @@ -221,10 +221,10 @@ bprint :: proc(buf: []byte, args: ..any, sep := " ") -> string { sb := strings.builder_from_bytes(buf[0:len(buf)]) return sbprint(buf=&sb, args=args, sep=sep) } -// Creates a formatted string with a newline character at the end using a buffer from an array +// Creates a formatted string using a supplied buffer as the backing array, appends newline. Writes into the buffer. // // Inputs: -// - buf: The source buffer +// - buf: The backing buffer // - args: A variadic list of arguments to be formatted // - sep: An optional separator string (default is a single space) // @@ -234,10 +234,10 @@ bprintln :: proc(buf: []byte, args: ..any, sep := " ") -> string { sb := strings.builder_from_bytes(buf[0:len(buf)]) return sbprintln(buf=&sb, args=args, sep=sep) } -// Creates a formatted string using a buffer from an array and a format string +// Creates a formatted string using a supplied buffer as the backing array. Writes into the buffer. // // Inputs: -// - buf: The source buffer +// - buf: The backing buffer // - fmt: A format string with placeholders for the provided arguments // - args: A variadic list of arguments to be formatted //