diff options
| author | 2014-04-18 17:52:49 -0400 | |
|---|---|---|
| committer | 2014-04-18 17:52:49 -0400 | |
| commit | 958bca606e80110e05d7c142dda3097fddc96503 (patch) | |
| tree | 576917751444b4dfdb476d040b4e075bde431b7b /src/common/string_util.cpp | |
| parent | Init window size from VideoCore. Start changing the default window behavior... (diff) | |
| parent | renamed hw_lcd module to just lcd (diff) | |
| download | yuzu-958bca606e80110e05d7c142dda3097fddc96503.tar.gz yuzu-958bca606e80110e05d7c142dda3097fddc96503.tar.xz yuzu-958bca606e80110e05d7c142dda3097fddc96503.zip | |
Merge branch 'hle-interface'
Diffstat (limited to '')
| -rw-r--r-- | src/common/string_util.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp index a99644f11..e5a9ba322 100644 --- a/src/common/string_util.cpp +++ b/src/common/string_util.cpp | |||
| @@ -17,6 +17,22 @@ | |||
| 17 | #include <errno.h> | 17 | #include <errno.h> |
| 18 | #endif | 18 | #endif |
| 19 | 19 | ||
| 20 | /// Make a string lowercase | ||
| 21 | void LowerStr(char* str) { | ||
| 22 | for (int i = 0; str[i]; i++) { | ||
| 23 | str[i] = tolower(str[ i ]); | ||
| 24 | } | ||
| 25 | } | ||
| 26 | |||
| 27 | /// Make a string uppercase | ||
| 28 | void UpperStr(char* str) { | ||
| 29 | for (int i=0; i < strlen(str); i++) { | ||
| 30 | if(str[i] >= 'a' && str[i] <= 'z') { | ||
| 31 | str[i] &= 0xDF; | ||
| 32 | } | ||
| 33 | } | ||
| 34 | } | ||
| 35 | |||
| 20 | // faster than sscanf | 36 | // faster than sscanf |
| 21 | bool AsciiToHex(const char* _szValue, u32& result) | 37 | bool AsciiToHex(const char* _szValue, u32& result) |
| 22 | { | 38 | { |