OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
String.h
Go to the documentation of this file.
1
4// ###########################################################################################################################################################################################################################################################################################################################
5
6#pragma once
7
8// OpenTwin header
11
12// std header
13#include <list>
14#include <string>
15
16namespace ot {
17
21 public:
22
24 static std::string toLower(const std::string& _string);
25
27 static std::string evaluateEscapeCharacters(const std::string& _string);
28
33 static std::list<std::string> split(const std::string& _str, char _splitBy, bool _skipEmpty = false);
34
39 static std::list<std::string> split(const std::string& _str, const std::string& _splitBy, bool _skipEmpty = false);
40
45 static std::list<std::wstring> split(const std::wstring& _str, wchar_t _splitBy, bool _skipEmpty = false);
46
51 static std::list<std::wstring> split(const std::wstring& _str, const std::wstring& _splitBy, bool _skipEmpty = false);
52
53 static std::list<std::string> smartSplit(const std::string& _str, const std::string& _splitBy, bool _evaluateEscapeCharacters = true, bool _skipEmpty = false);
54
56 static std::string replace(const std::string& _str, const std::string& _what, const std::string& _with);
57
59 static std::wstring replace(const std::wstring& _str, const std::wstring& _what, const std::wstring& _with);
60
62 static char* getCStringCopy(const std::string& _str);
63
65 static wchar_t* getCStringCopy(const std::wstring& _str);
66
70 template <class T> static inline T toNumber(const std::string& _string, bool& _failed);
71
75 template <class T> static inline bool isNumber(const std::string& _string);
76
81 template <class T> static inline std::string numberToHexString(T _number, char _fill = '0', int _length = 16);
82 };
83}
84
85#include "OTCore/String.hpp"
#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
Definition String.h:18
Definition Connector.h:8