Build panel and reworking Open paths, not compiling

This commit is contained in:
krzosa
2025-12-24 11:19:23 +01:00
parent ceb6747fcd
commit b98d14f9dd
10 changed files with 94 additions and 23 deletions

View File

@@ -69,7 +69,6 @@ API bool IsParen(char16_t c) {
return result;
}
API String16 Chop(String16 a, int64_t len) {
len = ClampTop(len, a.len);
String16 result = {a.data, a.len - len};
@@ -95,6 +94,13 @@ API String16 GetPrefix(String16 a, int64_t len) {
return result;
}
API char16_t At(String16 a, int64_t idx) {
if (idx < a.len) {
return a.data[idx];
}
return 0;
}
API String16 GetSlice(String16 arr, int64_t first_index, int64_t one_past_last_index) {
// Negative indexes work in python style, they return you the index counting from end of list
if (one_past_last_index == SLICE_LAST) one_past_last_index = arr.len;