Files
coven/core/string_helpers.jai
2025-03-22 17:33:10 +01:00

10 lines
281 B
Plaintext

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;
}
tprint_c :: (str: string, args: .. Any) -> *u8 {
return to_temp_c_string(tprint(str, ..args));
}