mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-03 10:57:15 -04:00
Allow for either .odin file or directory as the initial start
This commit is contained in:
1 parent
6aae381e83
commit
df578d6ec5
10 files changed
+40
-1495
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user