more string fns
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user