Update strings case convertors to be unicode compliant

This commit is contained in:
gingerBill
2020-05-24 17:50:27 +01:00
parent e42f7008fc
commit f06efffe22
3 changed files with 201 additions and 173 deletions
+18 -1
View File
@@ -8,10 +8,27 @@ Builder :: struct {
buf: [dynamic]byte,
}
make_builder :: proc(allocator := context.allocator) -> Builder {
make_builder_none :: proc(allocator := context.allocator) -> Builder {
return Builder{make([dynamic]byte, allocator)};
}
make_builder_len :: proc(len: int, allocator := context.allocator) -> Builder {
return Builder{make([dynamic]byte, len, allocator)};
}
make_builder_len_cap :: proc(len, cap: int, allocator := context.allocator) -> Builder {
return Builder{make([dynamic]byte, len, cap, allocator)};
}
make_builder :: proc{
make_builder_none,
make_builder_len,
make_builder_len_cap,
};
destroy_builder :: proc(b: ^Builder) {
delete(b.buf);
clear(&b.buf);