Allow for either .odin file or directory as the initial start

This commit is contained in:
gingerBill
2018-05-27 11:40:27 +01:00
parent 6aae381e83
commit df578d6ec5
10 changed files with 40 additions and 1495 deletions

View File

@@ -287,6 +287,16 @@ String remove_directory_from_path(String const &s) {
}
return substring(s, s.len-len, s.len);
}
String directory_from_path(String const &s) {
isize i = s.len-1;
for (; i >= 0; i--) {
if (s[i] == '/' ||
s[i] == '\\') {
break;
}
}
return substring(s, 0, i);
}
String concatenate_strings(gbAllocator a, String const &x, String const &y) {