Rename strings.Builder procedures to be consistent with the rest of the core library

This commit is contained in:
gingerBill
2022-07-11 11:50:08 +01:00
parent 9e376fbda7
commit c90b7c38f1
12 changed files with 106 additions and 144 deletions
+4 -4
View File
@@ -25,8 +25,8 @@ import "core:strings"
MAX_RUNE_CODEPOINT :: int(unicode.MAX_RUNE)
write_rune :: strings.write_rune_builder
write_string :: strings.write_string_builder
write_rune :: strings.write_rune
write_string :: strings.write_string
Error :: enum u8 {
None = 0,
@@ -94,8 +94,8 @@ decode_xml :: proc(input: string, options := XML_Decode_Options{}, allocator :=
l := len(input)
if l == 0 { return "", .None }
builder := strings.make_builder()
defer strings.destroy_builder(&builder)
builder := strings.builder_make()
defer strings.builder_destroy(&builder)
t := Tokenizer{src=input}
in_data := false
+2 -2
View File
@@ -18,9 +18,9 @@ Marshal_Error :: union #shared_nil {
}
marshal :: proc(v: any, allocator := context.allocator) -> (data: []byte, err: Marshal_Error) {
b := strings.make_builder(allocator)
b := strings.builder_make(allocator)
defer if err != nil {
strings.destroy_builder(&b)
strings.builder_destroy(&b)
}
marshal_to_builder(&b, v) or_return