mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
StringUtil: Add PathToFileName function
This commit is contained in:
parent
c86832849a
commit
5f6598f9e9
4 changed files with 18 additions and 14 deletions
|
@ -322,6 +322,13 @@ bool SplitPath(std::string_view full_path, std::string* path, std::string* filen
|
|||
return true;
|
||||
}
|
||||
|
||||
std::string PathToFileName(std::string_view path)
|
||||
{
|
||||
std::string file_name, extension;
|
||||
SplitPath(path, nullptr, &file_name, &extension);
|
||||
return file_name + extension;
|
||||
}
|
||||
|
||||
void BuildCompleteFilename(std::string& complete_filename, std::string_view path,
|
||||
std::string_view filename)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue