normalize paths with inconsistent slashes

This commit is contained in:
Nikita Smith committed 2026-02-20 22:08:26 -08:00
1 parent 4b88258a30
commit 20d3fa4ddb
5 files changed
+21 -6

No files matched your search

+14
View File
@@ -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