mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
StringUtil: Add PathToFileName function
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user