Class that handles strings
Class that handles strings. The most common operators for strings are implemented. This is by no means a very complete implementation, there surely are lots of commercial solutions around but for now this is good enough for me. In addition one can add all sorts of string manipulations as they are needed.Comments:
- NULL string:
Proper support for the NULL string (pointer to NULL with iLength equal 0). Default constructor gives NULL string. All subsequent operations must take this possibility into account (i.e. be protected against string.h manipulations of the NULL string).- BOOL data type:
We use the bool data type that we introduce from the STL library as the Sun C++ compiler doesn't support this data type yet.
friend ostream& operator<<( ostream& os, const pstring &theString )
friend istream& operator>>( istream& is, pstring &theString )
pstring( const char *pcString = NULL )
pstring( const pstring &theString )
pstring( const long iValue )
~pstring()
pstring& operator=( pstring &rhs )
pstring& operator=( const char *buffer )
BOOL operator==( const pstring &rhs )
BOOL operator==( const char *rhs )
BOOL operator!=( const pstring &rhs )
BOOL operator!=( const char *rhs )
pstring& operator+=( const pstring &rhs )
pstring operator+( const pstring &rhs )
char& operator[]( int iPosition )
const char& operator[]( int iPosition )
operator const char* ()
char* CastToChar()
void print()
int size()
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de