CDImage: Add support for loading PBP images

This commit is contained in:
Albert Liu
2021-03-11 23:24:12 -08:00
parent a34f0d5599
commit 46ff2b553d
12 changed files with 882 additions and 6 deletions

View File

@ -263,6 +263,15 @@ bool IsAbsolutePath(const std::string_view& path)
#endif
}
std::string StripExtension(const std::string_view& path)
{
std::string_view::size_type pos = path.rfind('.');
if (pos == std::string::npos)
return std::string(path);
return std::string(path, 0, pos);
}
std::string ReplaceExtension(const std::string_view& path, const std::string_view& new_extension)
{
std::string_view::size_type pos = path.rfind('.');