|
#ifndef __SMARTSTRING_H__
#define __SMARTSTRING_H__
#include <stdlib.h>
class CSmartString
{
char *m_pchString;
int m_iLength;
int m_iSize;
bool m_bIsStringStatic;
public:
CSmartString();
~CSmartString();
void operator = (CSmartString &NewString);
void operator = ( const char* szText );
bool operator == (CSmartString &CmpString);
bool operator == (const char *pszCmpString);
operator const char* ();
bool Reference(CSmartString &ReferenceString);
bool Construct(int iStringPoolSize, void *pvStringPool = NULL);
void Destruct();
bool SetString(const char *pchNewString, int iNewStringLength = -1);
const char* GetString();
int GetLength();
bool IsEmpty();
void Empty();
bool AddChar(char chChar);
bool Compare(const char *pchCmpString, int iCmpStringLength = -1);
bool Reallocate(int iNewStringSize);
private:
CSmartString(CSmartString&);
};
#endif
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.