mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-28 13:28:01 +03:00
cellPhotoExport/cellVideoExport: fix filenames
This commit is contained in:
parent
416b14de72
commit
934e7b614c
4 changed files with 91 additions and 16 deletions
|
@ -615,3 +615,13 @@ bool fmt::match(const std::string& source, const std::string& mask)
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string get_file_extension(const std::string& file_path)
|
||||
{
|
||||
if (usz dotpos = file_path.find_last_of('.'); dotpos != std::string::npos && dotpos + 1 < file_path.size())
|
||||
{
|
||||
return file_path.substr(dotpos + 1);
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
|
|
@ -27,6 +27,9 @@ bool try_to_int64(s64* out, std::string_view value, s64 min, s64 max);
|
|||
// Convert string to unsigned integer
|
||||
bool try_to_uint64(u64* out, std::string_view value, u64 min, u64 max);
|
||||
|
||||
// Get the file extension of a file path ("png", "jpg", etc.)
|
||||
std::string get_file_extension(const std::string& file_path);
|
||||
|
||||
namespace fmt
|
||||
{
|
||||
std::string replace_all(std::string_view src, std::string_view from, std::string_view to, usz count = -1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue