26 static std::string toLower(
const std::string& _string);
29 static std::string evaluateEscapeCharacters(
const std::string& _string);
35 static std::list<std::string> split(
const std::string& _str,
char _splitBy,
bool _skipEmpty =
false);
41 static std::list<std::string> split(
const std::string& _str,
const std::string& _splitBy,
bool _skipEmpty =
false);
47 static std::list<std::wstring> split(
const std::wstring& _str,
wchar_t _splitBy,
bool _skipEmpty =
false);
53 static std::list<std::wstring> split(
const std::wstring& _str,
const std::wstring& _splitBy,
bool _skipEmpty =
false);
55 static std::list<std::string> smartSplit(
const std::string& _str,
const std::string& _splitBy,
bool _evaluateEscapeCharacters =
true,
bool _skipEmpty =
false);
58 static std::string replace(
const std::string& _str,
const std::string& _what,
const std::string& _with);
61 static std::wstring replace(
const std::wstring& _str,
const std::wstring& _what,
const std::wstring& _with);
64 static char* getCStringCopy(
const std::string& _str);
67 static wchar_t* getCStringCopy(
const std::wstring& _str);
72 template <
class T>
static inline T toNumber(
const std::string& _string,
bool& _failed);
78 template <
class T>
static inline std::string numberToHexString(T _number,
char _fill =
'0',
int _length = 16);
83 std::stringstream ss(_string);
87 if (ss.fail()) { _failed =
true; }
90 if (!rest.empty()) { _failed =
true; }
96 ss << std::hex << std::setw(_length) << std::setfill(_fill) << _number;
97 return std::move(ss.str());
#define OT_CORE_API_EXPORT
Dll import.
Definition CoreAPIExport.h:8
This file contains defines that may be used simplyfy class creation.
#define OT_DECL_NODEFAULT(___class)
Removes the default copy constructor and assignment operator.
Definition OTClassHelper.h:22
#define OT_DECL_NOCOPY(___class)
Removes the default copy constructor and assignment operator.
Definition OTClassHelper.h:14
static T toNumber(const std::string &_string, bool &_failed)
Convert the provided string to a number.
Definition String.h:82
static std::string numberToHexString(T _number, char _fill='0', int _length=16)
Returns a hex string representing the provided number.
Definition String.h:94