Basic command line flags: e.g. -opt=0

This commit is contained in:
Ginger Bill
2017-06-24 22:58:50 +01:00
parent 18f885efab
commit 1d81b73df9
8 changed files with 314 additions and 90 deletions

View File

@@ -80,6 +80,13 @@ gb_inline String make_string_c(char *text) {
return make_string(cast(u8 *)cast(void *)text, gb_strlen(text));
}
String substring(String s, isize lo, isize hi) {
isize max = s.len;
GB_ASSERT(lo <= hi && hi <= max);
return make_string(s.text+lo, hi-lo);
}