Windows C++ Library
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends
CString Class Reference

#include <String.hpp>

Inheritance diagram for CString:
CPath

List of all members.

Classes

struct  StringData

Public Types

typedef const tchar * const_iterator
typedef tchar * iterator

Public Member Functions

 CString ()
 CString (uint iRscID)
 CString (const tchar *pszBuffer)
 CString (const tchar *pszBuffer, size_t iChars)
 CString (const CString &strSrc)
 ~CString ()
void BufferSize (size_t nChars)
void LoadRsc (uint iRscID)
bool Empty () const
size_t Length () const
const tchar * c_str () const
tchar * Buffer () const
size_t Capacity () const
 Get the capacity of the buffer in chars, inc the null termiantor.
const_iterator begin () const
const_iterator end () const
iterator begin ()
iterator end ()
void Insert (size_t nPos, const tchar *pszString)
void Delete (size_t nFirst, size_t nCount=1)
void Replace (tchar cOldChar, tchar cNewChar)
void Replace (tchar cChar, const tchar *pszString)
void Replace (const tchar *pszOldString, const tchar *pszNewString, bool bIgnoreCase=true)
CStringRepCtrlChars ()
CStringTrim (bool bLeft=true, bool bRight=true)
CStringToLower ()
CStringToUpper ()
size_t Find (tchar cChar, size_t nStart=0) const
size_t Find (const tchar *pszStr, size_t nStart=0) const
size_t Count (tchar cChar) const
size_t Count (tchar cChar, size_t nStart, size_t nEnd) const
CString Left (size_t nCount) const
CString Mid (size_t nFirst, size_t nCount) const
CString Right (size_t nCount) const
void Format (const tchar *pszFormat,...)
void FormatEx (const tchar *pszFormat, va_list args)
tchar & operator[] (size_t nChar)
const CStringoperator= (const CString &strSrc)
const CStringoperator= (const tchar *pszBuffer)
const CStringoperator= (const tstring &string)
 operator const tchar * () const
bool operator== (const tchar *pszString) const
bool operator== (const CString &strString) const
bool operator!= (const tchar *pszString) const
bool operator!= (const CString &strString) const
bool operator< (const tchar *pszString) const
bool operator< (const CString &strString) const
int Compare (const tchar *pszString, bool bIgnoreCase=true) const
int Compare (const tchar *pszString, size_t nChars, bool bIgnoreCase=true) const
void operator+= (const tchar *pszString)
void operator+= (tchar cChar)
void operator+= (const tstring &string)

Static Public Member Functions

static CString Fmt (const tchar *pszFormat,...)
static CString FmtEx (const tchar *pszFormat, va_list args)

Protected Member Functions

StringDataGetData () const
void Copy (const tchar *lpszBuffer)
void Copy (const tchar *lpszBuffer, size_t nChars)
void Free ()

Protected Attributes

tchar * m_pszData

Static Protected Attributes

static StringData strNULL
static tchar * pszNULL = strNULL.m_acData

Friends

void operator>> (WCL::IInputStream &rStream, CString &rString)
void operator<< (WCL::IOutputStream &rStream, const CString &rString)
tostream & operator<< (tostream &os, const CString &str)
 STL output stream inserter.

Member Typedef Documentation

typedef const tchar* CString::const_iterator
typedef tchar* CString::iterator

Constructor & Destructor Documentation

CString::CString ( ) [inline]
CString::CString ( uint  iRscID) [inline]
CString::CString ( const tchar *  pszBuffer) [inline]
CString::CString ( const tchar *  pszBuffer,
size_t  iChars 
) [inline]
CString::CString ( const CString strSrc) [inline]
CString::~CString ( ) [inline]

Member Function Documentation

void CString::BufferSize ( size_t  nChars)
void CString::LoadRsc ( uint  iRscID)
bool CString::Empty ( ) const [inline]
size_t CString::Length ( ) const [inline]
const tchar * CString::c_str ( ) const [inline]
tchar * CString::Buffer ( ) const [inline]
size_t CString::Capacity ( ) const [inline]

Get the capacity of the buffer in chars, inc the null termiantor.

This is the same value that would be passed to BufferSize().

void CString::Insert ( size_t  nPos,
const tchar *  pszString 
)
void CString::Delete ( size_t  nFirst,
size_t  nCount = 1 
)
void CString::Replace ( tchar  cOldChar,
tchar  cNewChar 
)
void CString::Replace ( tchar  cChar,
const tchar *  pszString 
)
void CString::Replace ( const tchar *  pszOldString,
const tchar *  pszNewString,
bool  bIgnoreCase = true 
)
CString & CString::Trim ( bool  bLeft = true,
bool  bRight = true 
)
CString & CString::ToLower ( ) [inline]
CString & CString::ToUpper ( ) [inline]
size_t CString::Find ( tchar  cChar,
size_t  nStart = 0 
) const
size_t CString::Find ( const tchar *  pszStr,
size_t  nStart = 0 
) const
size_t CString::Count ( tchar  cChar) const
size_t CString::Count ( tchar  cChar,
size_t  nStart,
size_t  nEnd 
) const
CString CString::Left ( size_t  nCount) const
CString CString::Mid ( size_t  nFirst,
size_t  nCount 
) const
CString CString::Right ( size_t  nCount) const
void CString::Format ( const tchar *  pszFormat,
  ... 
)
void CString::FormatEx ( const tchar *  pszFormat,
va_list  args 
)
CString CString::Fmt ( const tchar *  pszFormat,
  ... 
) [static]
CString CString::FmtEx ( const tchar *  pszFormat,
va_list  args 
) [static]
tchar & CString::operator[] ( size_t  nChar) [inline]

Reimplemented in CPath.

const CString & CString::operator= ( const CString strSrc) [inline]

Reimplemented in CPath.

const CString & CString::operator= ( const tchar *  pszBuffer) [inline]

Reimplemented in CPath.

const CString & CString::operator= ( const tstring &  string) [inline]

Reimplemented in CPath.

CString::operator const tchar * ( ) const [inline]

Reimplemented in CPath.

bool CString::operator== ( const tchar *  pszString) const [inline]
bool CString::operator== ( const CString strString) const [inline]
bool CString::operator!= ( const tchar *  pszString) const [inline]
bool CString::operator!= ( const CString strString) const [inline]
bool CString::operator< ( const tchar *  pszString) const [inline]
bool CString::operator< ( const CString strString) const [inline]
int CString::Compare ( const tchar *  pszString,
bool  bIgnoreCase = true 
) const [inline]
int CString::Compare ( const tchar *  pszString,
size_t  nChars,
bool  bIgnoreCase = true 
) const [inline]
void CString::operator+= ( const tchar *  pszString)
void CString::operator+= ( tchar  cChar)
void CString::operator+= ( const tstring &  string) [inline]
CString::StringData * CString::GetData ( ) const [inline, protected]
void CString::Copy ( const tchar *  lpszBuffer) [inline, protected]
void CString::Copy ( const tchar *  lpszBuffer,
size_t  nChars 
) [protected]
void CString::Free ( ) [protected]

Friends And Related Function Documentation

void operator>> ( WCL::IInputStream rStream,
CString rString 
) [friend]
void operator<< ( WCL::IOutputStream rStream,
const CString rString 
) [friend]
tostream& operator<< ( tostream &  os,
const CString str 
) [friend]

STL output stream inserter.


Member Data Documentation

tchar* CString::m_pszData [protected]
tchar * CString::pszNULL = strNULL.m_acData [static, protected]

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