Improve SearchProject and misc

This commit is contained in:
Krzosa Karol
2026-01-06 10:50:55 +01:00
parent ecbc800fdd
commit 94b3bc832b
7 changed files with 60 additions and 53 deletions

View File

@@ -536,3 +536,12 @@ API Int ChopNumber(String16 *string) {
Int result = strtoll(num_string.data, NULL, 10) - 1;
return result;
}
API String16 Concat(Allocator allocator, String16 a, String16 b) {
char16_t *p = AllocArray(allocator, char16_t, a.len + b.len + 1);
MemoryCopy(p, a.data, sizeof(char16_t) * a.len);
MemoryCopy(p + a.len, b.data, sizeof(char16_t) * b.len);
String16 result = {p, a.len + b.len};
result.data[result.len] = 0;
return result;
}