aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-01-01 16:11:13 +0000
committergingerBill <bill@gingerbill.org>2024-01-01 16:11:13 +0000
commitb410383aaf233f2d565a8601cc537b3bb158d064 (patch)
tree1028b753fc2ff8b4533353b59bf89b0d995086ea
parentf3caa4aee3ac744a909130253c5d9276b1d7d54d (diff)
parent89084befb031decbb093875b47196f73c38b3dc6 (diff)
Merge branch 'master' of https://github.com/odin-lang/Odin
-rw-r--r--core/fmt/fmt.odin6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fmt/fmt.odin b/core/fmt/fmt.odin
index ef0a4638c..c9e284edc 100644
--- a/core/fmt/fmt.odin
+++ b/core/fmt/fmt.odin
@@ -216,7 +216,7 @@ tprintf :: proc(fmt: string, args: ..any) -> string {
// Returns: A formatted string
//
bprint :: proc(buf: []byte, args: ..any, sep := " ") -> string {
- sb := strings.builder_from_bytes(buf[0:len(buf)])
+ sb := strings.builder_from_bytes(buf)
return sbprint(&sb, ..args, sep=sep)
}
// Creates a formatted string using a supplied buffer as the backing array, appends newline. Writes into the buffer.
@@ -229,7 +229,7 @@ bprint :: proc(buf: []byte, args: ..any, sep := " ") -> string {
// Returns: A formatted string with a newline character at the end
//
bprintln :: proc(buf: []byte, args: ..any, sep := " ") -> string {
- sb := strings.builder_from_bytes(buf[0:len(buf)])
+ sb := strings.builder_from_bytes(buf)
return sbprintln(&sb, ..args, sep=sep)
}
// Creates a formatted string using a supplied buffer as the backing array. Writes into the buffer.
@@ -242,7 +242,7 @@ bprintln :: proc(buf: []byte, args: ..any, sep := " ") -> string {
// Returns: A formatted string
//
bprintf :: proc(buf: []byte, fmt: string, args: ..any) -> string {
- sb := strings.builder_from_bytes(buf[0:len(buf)])
+ sb := strings.builder_from_bytes(buf)
return sbprintf(&sb, fmt, ..args)
}
// Runtime assertion with a formatted message