diff options
| author | John Peterson <jpeterson57@gmail.com> | 2009-09-02 21:54:53 +0000 |
|---|---|---|
| committer | John Peterson <jpeterson57@gmail.com> | 2009-09-02 21:54:53 +0000 |
| commit | bbd56ec92c5243f8942812061b1baa29d809b82b (patch) | |
| tree | 3e1e96a2d27ffabab4533f87ea682c41429eaaae /Source/Core/Common | |
| parent | 97af2f1126ae5c638a83a100c055c30947ed5697 (diff) | |
GUI: Added restart option to File menu
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4173 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common')
| -rw-r--r-- | Source/Core/Common/Src/StringUtil.cpp | 9 | ||||
| -rw-r--r-- | Source/Core/Common/Src/StringUtil.h | 4 |
2 files changed, 10 insertions, 3 deletions
diff --git a/Source/Core/Common/Src/StringUtil.cpp b/Source/Core/Common/Src/StringUtil.cpp index 7833017cef..57cfe503b7 100644 --- a/Source/Core/Common/Src/StringUtil.cpp +++ b/Source/Core/Common/Src/StringUtil.cpp @@ -370,10 +370,15 @@ bool SplitPath(const std::string& full_path, std::string* _pPath, std::string* _ return true; } - - #endif +std::string PathToFilename(std::string Path) +{ + std::string Name, Ending; + SplitPath(Path, 0, &Name, &Ending); + return Name + Ending; +} + void BuildCompleteFilename(std::string& _CompleteFilename, const std::string& _Path, const std::string& _Filename) { _CompleteFilename = _Path; diff --git a/Source/Core/Common/Src/StringUtil.h b/Source/Core/Common/Src/StringUtil.h index 4a2137b090..811b49bdde 100644 --- a/Source/Core/Common/Src/StringUtil.h +++ b/Source/Core/Common/Src/StringUtil.h @@ -72,8 +72,10 @@ void SplitString(const std::string& str, const std::string& delim, std::vector<s int ChooseStringFrom(const char* str, const char* * items); -// filehelper +// "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); |
