Lua_GetProjectPath, SDLK_Period
This commit is contained in:
@@ -810,6 +810,7 @@ String ToString(Allocator allocator, char16_t *wstring);
|
||||
String16 ToString16(Allocator allocator, String string);
|
||||
char16_t *ToWidechar(Allocator allocator, String string);
|
||||
void NormalizePathInPlace(String s);
|
||||
String CutLastSlash(String *s);
|
||||
String ChopLastSlash(String s);
|
||||
String ChopLastPeriod(String s);
|
||||
String SkipToLastSlash(String s);
|
||||
@@ -1480,6 +1481,13 @@ Array<String> Split(Allocator allocator, String string, String delimiter) {
|
||||
return result;
|
||||
}
|
||||
|
||||
String CutLastSlash(String *s) {
|
||||
String result = *s;
|
||||
Seek(*s, "/", &s->len, SeekFlag_MatchFindLast);
|
||||
result = Skip(result, s->len);
|
||||
return result;
|
||||
}
|
||||
|
||||
String ChopLastSlash(String s) {
|
||||
String result = s;
|
||||
Seek(s, "/", &result.len, SeekFlag_MatchFindLast);
|
||||
|
||||
Reference in New Issue
Block a user