mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-11-29 09:03:20 -08:00
normalize paths with inconsistent slashes
This commit is contained in:
1 parent
4b88258a30
commit
20d3fa4ddb
5 files changed
+21
-6
No files matched your search
@@ -255,6 +255,20 @@ rdim_lower_from_str8(RDIM_Arena *arena, RDIM_String8 string)
|
||||
return result;
|
||||
}
|
||||
|
||||
RDI_PROC RDIM_String8
|
||||
rdim_normalize_path_str8(RDIM_Arena *arena, RDIM_String8 path)
|
||||
{
|
||||
RDIM_String8 result = rdim_lower_from_str8(arena, path);
|
||||
for(RDI_U64 i = 0; i < result.RDIM_String8_SizeMember; i += 1)
|
||||
{
|
||||
if(result.RDIM_String8_BaseMember[i] == '\\')
|
||||
{
|
||||
result.RDIM_String8_BaseMember[i] = '/';
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
//- rjf: string lists
|
||||
|
||||
RDI_PROC void
|
||||
|
||||
Reference in new issue
Block a user