diff options
| author | Lucas Perlind <perlindluca@gmail.com> | 2023-03-29 12:18:51 +1100 |
|---|---|---|
| committer | Lucas Perlind <perlindluca@gmail.com> | 2023-03-29 12:19:05 +1100 |
| commit | 84d8798ad3ab35dde121e70569260bbb9cc4a325 (patch) | |
| tree | 04828a5e21f79164264fe0eba4d77f4f5523a3bd /core/strings/intern.odin | |
| parent | ab7e1e01de2d62173b520535d7d87c48eec3f6a6 (diff) | |
Fix website formatting and incorrect examples
Diffstat (limited to 'core/strings/intern.odin')
| -rw-r--r-- | core/strings/intern.odin | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/strings/intern.odin b/core/strings/intern.odin index 59395824a..e73b33f07 100644 --- a/core/strings/intern.odin +++ b/core/strings/intern.odin @@ -57,7 +57,8 @@ Returns an interned copy of the given text, adding it to the map if not already NOTE: The returned string lives as long as the map entry lives. -**Returns** The interned string and an allocator error if any +**Returns** +The interned string and an allocator error if any */ intern_get :: proc(m: ^Intern, text: string) -> (str: string, err: runtime.Allocator_Error) { entry := _intern_get_entry(m, text) or_return @@ -74,7 +75,8 @@ Returns an interned copy of the given text as a cstring, adding it to the map if NOTE: The returned cstring lives as long as the map entry lives -**Returns** The interned cstring and an allocator error if any +**Returns** +The interned cstring and an allocator error if any */ intern_get_cstring :: proc(m: ^Intern, text: string) -> (str: cstring, err: runtime.Allocator_Error) { entry := _intern_get_entry(m, text) or_return @@ -90,7 +92,8 @@ Sets and allocates the entry if it wasn't set yet - m: A pointer to the Intern struct - text: The string to be looked up or interned -**Returns** The new or existing interned entry and an allocator error if any +**Returns** +The new or existing interned entry and an allocator error if any */ _intern_get_entry :: proc(m: ^Intern, text: string) -> (new_entry: ^Intern_Entry, err: runtime.Allocator_Error) #no_bounds_check { if prev, ok := m.entries[text]; ok { |