Initial commit
This commit is contained in:
6
core/string_helpers.jai
Normal file
6
core/string_helpers.jai
Normal file
@@ -0,0 +1,6 @@
|
||||
to_temp_c_string :: (s: string) -> *u8 {
|
||||
result : *u8 = alloc(s.count + 1,, allocator=temp);
|
||||
memcpy(result, s.data, s.count);
|
||||
result[s.count] = 0;
|
||||
return result;
|
||||
}
|
||||
Reference in New Issue
Block a user