more progress on grime for code2

This commit is contained in:
2025-10-12 01:52:08 -04:00
parent 983cac0660
commit 54ff97b6c1
14 changed files with 1225 additions and 297 deletions

10
code2/grime/stirngs.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) }