EpcTools
An event based multi-threaded C++ development framework.
Public Member Functions | List of all members
EString Class Reference

String class. More...

#include <estring.h>

Inheritance diagram for EString:

Public Member Functions

 EString ()
 Default constructor. More...
 
 EString (cpStr s)
 Class constructor. More...
 
 EString (const std::string &s)
 Copy constructor. More...
 
 EString (const EString &s)
 Copy constructor. More...
 
EStringformat (cpChar pszFormat,...)
 Sets the value to the string using a "printf" style format string and arguments. More...
 
EStringtolower ()
 Converts this string to lowercase. More...
 
EStringtoupper ()
 Converts this string to uppercase. More...
 
 operator cpChar ()
 Retrieves a const char* to this string. More...
 
EStringoperator= (cpChar s)
 Assigns the specified NULL terminated strint to this string object. More...
 
EStringoperator= (const std::string s)
 Assignment operator. More...
 
Int icompare (EString &str)
 Compares this string object to the specified string object. More...
 
Int icompare (cpStr str)
 Compares this string object to the specified NULL terminated string. More...
 
Void ltrim ()
 Removes leading white space. More...
 
Void rtrim ()
 Removes trailing white space. More...
 
Void trim ()
 Removes leading and trailing white space. More...
 
EStringreplaceAll (cpStr srch, size_t srchlen, cpStr rplc, size_t rplclen)
 Replaces all occurances of the search string with the replacement string. More...
 
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 object. More...
 

Detailed Description

String class.

Constructor & Destructor Documentation

◆ EString() [1/4]

EString::EString ( )
inline

Default constructor.

◆ EString() [2/4]

EString::EString ( cpStr  s)
inline

Class constructor.

Parameters
sthe NULL terminated string to initilize this string object to.

◆ EString() [3/4]

EString::EString ( const std::string &  s)
inline

Copy constructor.

Parameters
sthe object to copy.

◆ EString() [4/4]

EString::EString ( const EString s)
inline

Copy constructor.

Parameters
sthe object to copy.

Member Function Documentation

◆ format()

EString & EString::format ( cpChar  pszFormat,
  ... 
)

Sets the value to the string using a "printf" style format string and arguments.

Returns
reference to this string object.

◆ icompare() [1/2]

Int EString::icompare ( cpStr  str)
inline

Compares this string object to the specified NULL terminated string.

Returns
see "strnicmp" for the definition of return value.

◆ icompare() [2/2]

Int EString::icompare ( EString str)
inline

Compares this string object to the specified string object.

Returns
see "strnicmp" for the definition of return value.

◆ ltrim()

Void EString::ltrim ( )
inline

Removes leading white space.

◆ operator cpChar()

EString::operator cpChar ( )
inline

Retrieves a const char* to this string.

Returns
a const char* to this string.

◆ operator=() [1/2]

EString& EString::operator= ( const std::string  s)
inline

Assignment operator.

Parameters
sthe string to assignment to this object.

◆ operator=() [2/2]

EString& EString::operator= ( cpChar  s)
inline

Assigns the specified NULL terminated strint to this string object.

Returns
reference to this string object.

◆ replaceAll()

EString & EString::replaceAll ( cpStr  srch,
size_t  srchlen,
cpStr  rplc,
size_t  rplclen 
)

Replaces all occurances of the search string with the replacement string.

Parameters
srchthe search string.
srchlenthe length of the search string.
rplcthe replacement string.
rplclenthe length of the replacement string.
Returns
a reference to this object.

◆ replaceAllCopy()

EString 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 object.

Parameters
srchthe search string.
srchlenthe length of the search string.
rplcthe replacement string.
rplclenthe length of the replacement string.
Returns
the new string object.

◆ rtrim()

Void EString::rtrim ( )
inline

Removes trailing white space.

◆ tolower()

EString & EString::tolower ( )

Converts this string to lowercase.

Returns
reference to this string object.

◆ toupper()

EString & EString::toupper ( )

Converts this string to uppercase.

Returns
reference to this string object.

◆ trim()

Void EString::trim ( )
inline

Removes leading and trailing white space.


The documentation for this class was generated from the following files: