10 lines
281 B
Plaintext
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));
|
|
} |