summaryrefslogtreecommitdiff
path: root/Source/Core/Common/StringUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/Common/StringUtil.cpp')
-rw-r--r--Source/Core/Common/StringUtil.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/Core/Common/StringUtil.cpp b/Source/Core/Common/StringUtil.cpp
index 3afb09873f..c44f3fa7b1 100644
--- a/Source/Core/Common/StringUtil.cpp
+++ b/Source/Core/Common/StringUtil.cpp
@@ -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)
{