harmonize to use null for c-string endings

This commit is contained in:
Jon Lipstate
2023-03-28 11:57:12 -07:00
parent 194fa7cd98
commit bbafc3fbd6
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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