more string fns

This commit is contained in:
Tenari
2026-06-02 07:33:28 -05:00
parent 45bdb7547b
commit a5788ba94c
2 changed files with 43 additions and 2 deletions
+5 -2
View File
@@ -345,8 +345,8 @@ typedef struct Codepoint {
} Codepoint;
typedef struct TextPos {
i64 line;
i64 column;
u32 line;
u32 column;
} TextPos;
typedef struct TextRange {
@@ -680,6 +680,9 @@ fn String stringFromRawCodepoint(Arena* a, u32 c);
fn bool stringInsertCodepointAtByte(String* s, Codepoint c, u32 byte_offset, bool keep_trailing_zero);
fn u8 stringDeleteCodepointAtByte(String* s, u32 byte_offset);
fn bool stringDeleteCodepointsBetweenByteOffsetsInclusive(String* s, u32 start, u32 end);
fn u32 stringCountLines(String s);
fn u32 stringLineLen(String s, u32 line_number);
fn u32 stringLineStartByteOffset(String s, u32 line_number);
///// OS-wrapped apis
void osInit();