From 81c4982a0a8fbb802319c8695e9fd128f3970de3 Mon Sep 17 00:00:00 2001 From: nakeee Date: Fri, 4 Sep 2009 11:48:49 +0000 Subject: [PATCH] Revert accidental change to stringutil git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4198 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/StringUtil.cpp | 7 +++++++ Source/Core/Common/Src/StringUtil.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/Source/Core/Common/Src/StringUtil.cpp b/Source/Core/Common/Src/StringUtil.cpp index dbc6f30345..1ab10a2f0c 100644 --- a/Source/Core/Common/Src/StringUtil.cpp +++ b/Source/Core/Common/Src/StringUtil.cpp @@ -495,3 +495,10 @@ std::string TabsToSpaces(int tab_size, const std::string &in) } return out; } + +std::string PathToFilename(std::string Path) +{ + std::string Name, Ending; + SplitPath(Path, 0, &Name, &Ending); + return Name + Ending; +} diff --git a/Source/Core/Common/Src/StringUtil.h b/Source/Core/Common/Src/StringUtil.h index 65ffefcbd4..e1a16e3efa 100644 --- a/Source/Core/Common/Src/StringUtil.h +++ b/Source/Core/Common/Src/StringUtil.h @@ -74,6 +74,9 @@ int ChooseStringFrom(const char* str, const char* * items); // "C:\Windows\winhelp.exe" to "C:\Windows\", "winhelp", "exe" bool SplitPath(const std::string& full_path, std::string* _pPath, std::string* _pFilename, std::string* _pExtension); +// "C:\Windows\winhelp.exe" to "winhelp.exe" +std::string PathToFilename(std::string Path); + void BuildCompleteFilename(std::string& _CompleteFilename, const std::string& _Path, const std::string& _Filename); void NormalizeDirSep(std::string* str);