EpcTools
An event based multi-threaded C++ development framework.
|
Go to the documentation of this file.
18 #ifndef __estring_h_included
19 #define __estring_h_included
40 EString(
const std::string &s) : std::string(s) {}
56 operator cpChar() {
return c_str(); }
62 *(std::string *)
this = s;
69 *(std::string *)
this = s;
76 return epc_strnicmp(c_str(), str.c_str(), length() > str.length() ? length() : str.length());
82 size_t len = strlen(str);
83 return epc_strnicmp(c_str(), str, length() > len ? length() : len);
89 erase(begin(), std::find_if(begin(), end(), [](Char ch) {
90 return !std::isspace(ch);
97 erase(std::find_if(rbegin(), rend(), [](Char ch) {
98 return !std::isspace(ch);
127 #endif // #define __estring_h_included
EString()
Default constructor.
Definition: estring.h:34
EString & toupper()
Converts this string to uppercase.
Definition: estring.cpp:72
Void trim()
Removes leading and trailing white space.
Definition: estring.h:105
Macros for various standard C library functions and standard includes.
EString(cpStr s)
Class constructor.
Definition: estring.h:37
Int icompare(EString &str)
Compares this string object to the specified string object.
Definition: estring.h:74
Void ltrim()
Removes leading white space.
Definition: estring.h:87
EString & replaceAll(cpStr srch, size_t srchlen, cpStr rplc, size_t rplclen)
Replaces all occurances of the search string with the replacement string.
Definition: estring.cpp:78
Void rtrim()
Removes trailing white space.
Definition: estring.h:95
EString & operator=(const std::string s)
Assignment operator.
Definition: estring.h:67
EString(const EString &s)
Copy constructor.
Definition: estring.h:43
#define epc_strnicmp(str1, str2, count)
strnicmp - strnicmp, strncasecmp
Definition: ebase.h:54
EString & format(cpChar pszFormat,...)
Sets the value to the string using a "printf" style format string and arguments.
Definition: estring.cpp:38
EString replaceAllCopy(cpStr srch, size_t srchlen, cpStr rplc, size_t rplclen)
Replaces all occurances of the search string with the replacement string and returns a new string obj...
Definition: estring.cpp:83
String class.
Definition: estring.h:30
EString & operator=(cpChar s)
Assigns the specified NULL terminated strint to this string object.
Definition: estring.h:60
EString(const std::string &s)
Copy constructor.
Definition: estring.h:40
EString & tolower()
Converts this string to lowercase.
Definition: estring.cpp:66
Int icompare(cpStr str)
Compares this string object to the specified NULL terminated string.
Definition: estring.h:80