diff options
| author | Jon Lipstate <Jon@Lipstate.com> | 2023-03-28 11:57:12 -0700 |
|---|---|---|
| committer | Jon Lipstate <Jon@Lipstate.com> | 2023-03-28 11:57:12 -0700 |
| commit | bbafc3fbd62124b4d6602424025f2226a99f408b (patch) | |
| tree | 24304b9acab1aba441e07eb2039d2f92e4496392 /core/strings/strings.odin | |
| parent | 194fa7cd983596e788997948271b4bc836ffaaa4 (diff) | |
harmonize to use null for c-string endings
Diffstat (limited to 'core/strings/strings.odin')
| -rw-r--r-- | core/strings/strings.odin | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/strings/strings.odin b/core/strings/strings.odin index b9cecae9d..8193f4de1 100644 --- a/core/strings/strings.odin +++ b/core/strings/strings.odin @@ -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 |