mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Allow pointers to append; Fix strconv stuff; new_slice allows for capacity
This commit is contained in:
+2
-2
@@ -1,8 +1,8 @@
|
||||
new_c_string :: proc(s: string) -> ^byte {
|
||||
c := new_c_string(byte, s.count+1);
|
||||
c := new_slice(byte, s.count+1);
|
||||
copy(c, cast([]byte)s);
|
||||
c[s.count] = 0;
|
||||
return c;
|
||||
return c.data;
|
||||
}
|
||||
|
||||
to_odin_string :: proc(c: ^byte) -> string {
|
||||
|
||||
Reference in New Issue
Block a user