misc changes

mostly added kt1l from watl exercise
This commit is contained in:
2025-08-07 10:53:35 -04:00
parent 3769413a50
commit 73bfdb63ea
12 changed files with 128 additions and 40 deletions

10
code/grime/strings.odin Normal file
View File

@@ -0,0 +1,10 @@
package grime
Raw_String :: struct {
data: [^]byte,
len: int,
}
string_cursor :: proc(s: string) -> [^]u8 { return slice_cursor(transmute([]byte) s) }
string_copy :: proc(dst, src: string) { slice_copy (transmute([]byte) dst, transmute([]byte) src) }
string_end :: proc(s: string) -> ^u8 { return slice_end (transmute([]byte) s) }
string_assert :: proc(s: string) { slice_assert(transmute([]byte) s) }