diff options
| author | 2014-09-07 00:49:52 -0700 | |
|---|---|---|
| committer | 2014-09-08 15:41:58 -0700 | |
| commit | 4ed24a06191a0dbf68bd72ad0fcc8d467b37f580 (patch) | |
| tree | f3a1e6b49dc193153d039c1144b3789a9e7a7bc6 /src/common/string_util.h | |
| parent | Merge pull request #95 from lioncash/disassembler (diff) | |
| download | yuzu-4ed24a06191a0dbf68bd72ad0fcc8d467b37f580.tar.gz yuzu-4ed24a06191a0dbf68bd72ad0fcc8d467b37f580.tar.xz yuzu-4ed24a06191a0dbf68bd72ad0fcc8d467b37f580.zip | |
loader.cpp: improved file extension checking, made Upper/LowerStr useful
Instead of forcibly taking the last 4 characters, it now finds the last extension separator (the period) and takes a substr of its location.
Diffstat (limited to 'src/common/string_util.h')
| -rw-r--r-- | src/common/string_util.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/common/string_util.h b/src/common/string_util.h index ba4cd363e..b1118816e 100644 --- a/src/common/string_util.h +++ b/src/common/string_util.h | |||
| @@ -13,10 +13,11 @@ | |||
| 13 | #include "common/common.h" | 13 | #include "common/common.h" |
| 14 | 14 | ||
| 15 | /// Make a string lowercase | 15 | /// Make a string lowercase |
| 16 | void LowerStr(char* str); | 16 | |
| 17 | std::string LowerStr(std::string str); | ||
| 17 | 18 | ||
| 18 | /// Make a string uppercase | 19 | /// Make a string uppercase |
| 19 | void UpperStr(char* str); | 20 | std::string UpperStr(std::string str); |
| 20 | 21 | ||
| 21 | std::string StringFromFormat(const char* format, ...); | 22 | std::string StringFromFormat(const char* format, ...); |
| 22 | // Cheap! | 23 | // Cheap! |