Build panel and reworking Open paths, not compiling
This commit is contained in:
@@ -84,6 +84,13 @@ API String GetPrefix(String a, int64_t len) {
|
||||
return result;
|
||||
}
|
||||
|
||||
API char At(String a, int64_t idx) {
|
||||
if (idx < a.len) {
|
||||
return a.data[idx];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
API String GetSlice(String 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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user