Improve SearchProject and misc
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user