mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-29 02:40:05 +00:00
harmonize to use null for c-string endings
This commit is contained in:
@@ -86,7 +86,7 @@ NOTE: The created string is only valid as long as the pointer and length are val
|
||||
|
||||
**Returns** A string created from the null-terminated byte pointer and length
|
||||
*/
|
||||
string_from_zero_terminated_ptr :: proc(ptr: ^byte, len: int) -> string {
|
||||
string_from_null_terminated_ptr :: proc(ptr: ^byte, len: int) -> string {
|
||||
s := transmute(string)mem.Raw_String{ptr, len}
|
||||
s = truncate_to_byte(s, 0)
|
||||
return s
|
||||
|
||||
Reference in New Issue
Block a user