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 (cpStr s, size_t n)
 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 () const
 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::EString ( )
inline

Default constructor.

EString::EString ( cpStr  s)
inline

Class constructor.

Parameters
sthe NULL terminated string to initilize this string object to.
EString::EString ( cpStr  s,
size_t  n 
)
inline

Class constructor.

Parameters
sa pointer to the beginning of the character buffer.
nthe number of characters to assign to the string.
EString::EString ( const std::string &  s)
inline

Copy constructor.

Parameters
sthe object to copy.
EString::EString ( const EString s)
inline

Copy constructor.

Parameters
sthe object to copy.

Member Function Documentation

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.
Int EString::icompare ( EString str)
inline

Compares this string object to the specified string object.

Returns
see "strnicmp" for the definition of return value.
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.
Void EString::ltrim ( )
inline

Removes leading white space.

EString::operator cpChar ( ) const
inline

Retrieves a const char* to this string.

Returns
a const char* to this string.
EString& EString::operator= ( cpChar  s)
inline

Assigns the specified NULL terminated strint to this string object.

Returns
reference to this string object.
EString& EString::operator= ( const std::string  s)
inline

Assignment operator.

Parameters
sthe string to assignment to this object.
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.
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.
Void EString::rtrim ( )
inline

Removes trailing white space.

EString & EString::tolower ( )

Converts this string to lowercase.

Returns
reference to this string object.
EString & EString::toupper ( )

Converts this string to uppercase.

Returns
reference to this string object.
Void EString::trim ( )
inline

Removes leading and trailing white space.


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