General functionality without context

This commit is contained in:
gingerBill committed 2020-03-04 22:09:58 +00:00
1 parent 6151fdb324
commit e1da631d26
4 files changed
+218 -24

No files matched your search

+8
View File
@@ -101,6 +101,14 @@ char *alloc_cstring(gbAllocator a, String s) {
return c_str;
}
char *cstring_duplicate(gbAllocator a, char const *s) {
isize len = gb_strlen(s);
char *c_str = gb_alloc_array(a, char, len+1);
gb_memmove(c_str, s, len);
c_str[len] = '\0';
return c_str;
}
gb_inline bool str_eq_ignore_case(String const &a, String const &b) {