2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 02:27:43 +00:00

string_view refactor

This commit is contained in:
Jack Andersen
2017-11-12 20:13:53 -10:00
parent 942032688d
commit 4111d49d64
28 changed files with 388 additions and 406 deletions

View File

@@ -15,7 +15,8 @@
#include <wchar.h>
#endif
#include <string>
#include <string.h>
#include <string_view>
#include <cstring>
#include <algorithm>
namespace hecl
@@ -29,6 +30,7 @@ namespace hecl
typedef wchar_t SystemChar;
static inline size_t StrLen(const SystemChar* str) {return wcslen(str);}
typedef std::wstring SystemString;
typedef std::wstring_view SystemStringView;
static inline void ToLower(SystemString& str)
{std::transform(str.begin(), str.end(), str.begin(), towlower);}
static inline void ToUpper(SystemString& str)
@@ -41,6 +43,7 @@ typedef struct _stat Sstat;
typedef char SystemChar;
static inline size_t StrLen(const SystemChar* str) {return strlen(str);}
typedef std::string SystemString;
typedef std::string_view SystemStringView;
static inline void ToLower(SystemString& str)
{std::transform(str.begin(), str.end(), str.begin(), tolower);}
static inline void ToUpper(SystemString& str)