Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

CString_ Class Reference

CString. More...

#include <CString.h>

List of all members.

Public Methods

void MakeLower ()
void MakeUpper ()
 CString_ ()
 Constructed an empty CString. More...

 CString_ (const char *psz)
 Constructs a CString from a PSZ. More...

 CString_ (const unsigned char *psz)
 Constructs a CString from a PSZ. More...

 CString_ (const CString_ &stringSrc)
 Copy constructor. More...

 CString_ (const char *psz, const size_t siz)
 Constructs a CString from a potentially unterminated string. More...

 CString_ (const unsigned char *psz, const size_t siz)
 Constructs a CString from a potentially unterminated string. More...

const CString_& operator= (const CString_ &stringSrc)
 Assignment operator. More...

const CString_& operator= (const char *psz)
 Assignment operator. More...

const CString_& operator= (const unsigned char *psz)
 Assignment operator. More...

 ~CString_ ()
 Destructor. More...

void Empty ()
 Reset the CString to an empty one. More...

const CString_& operator+= (const CString_ &string)
 Concatenate two strings. More...

const CString_& operator+= (char ch)
 Concatenate a string and a character. More...

const CString_& operator+= (const char *psz)
 Concatenate two strings. More...

 operator const char * () const
 return as a normal 'c' string. More...

void Format (const char *fmt,...)
int CompareNoCase (const CString_ &string) const
 Compare two strings ignoring upper and lower case. More...

int Compare (const CString_ &string) const
 Compare two strings. More...

int GetLength () const
 Return the length of the CString. More...

bool IsEmpty ()
 Return if the CString is empty. More...

char GetAt (int p)
 Return the character at the specified position. More...

void SetAt (int p, char ch)
 Set the character at the specified position. More...

CString_ Mid (int nFirst, int nCount=-1) const
int Find (int ch, int startAt=0) const
 Return the offset of the character in the CString or -1. More...

int Find (const char *str, int startAt=0) const
 Return the offset of the string in the CString or -1. More...

int ReverseFind (int ch) const
 Return the offset of the last character in the CString or -1. More...

CString_ Left (int nCount) const
 Returns the leftmost nCount characters from a CString. More...

CString_ Right (int nCount) const
 Returns the rightmost nCount characters from a CString. More...


Private Attributes

char* s
 Points to the actual string data. More...

size_t l
 The current length of the string. More...

size_t r
 The amount of memory currently allocated. More...


Friends

class  CString_support
CString_ operator+ (const CString_ &string, const char *lpsz)
 Concatenate two strings. More...


Detailed Description

CString.


Constructor & Destructor Documentation

CString_::CString_ ( )
 

Constructed an empty CString.

CString_::CString_ ( const char * psz )
 

Constructs a CString from a PSZ.

CString_::CString_ ( const unsigned char * psz )
 

Constructs a CString from a PSZ.

CString_::CString_ ( const CString_ & stringSrc )
 

Copy constructor.

CString_::CString_ ( const char * psz,
const size_t siz )
 

Constructs a CString from a potentially unterminated string.

CString_::CString_ ( const unsigned char * psz,
const size_t siz )
 

Constructs a CString from a potentially unterminated string.

CString_::~CString_ ( )
 

Destructor.


Member Function Documentation

int CString_::Compare ( const CString_ & string ) const [inline]
 

Compare two strings.

int CString_::CompareNoCase ( const CString_ & string ) const [inline]
 

Compare two strings ignoring upper and lower case.

void CString_::Empty ( )
 

Reset the CString to an empty one.

int CString_::Find ( const char * str,
int startAt = 0 ) const [inline]
 

Return the offset of the string in the CString or -1.

int CString_::Find ( int ch,
int startAt = 0 ) const [inline]
 

Return the offset of the character in the CString or -1.

char CString_::GetAt ( int p ) [inline]
 

Return the character at the specified position.

int CString_::GetLength ( ) const [inline]
 

Return the length of the CString.

bool CString_::IsEmpty ( ) [inline]
 

Return if the CString is empty.

CString_ CString_::Left ( int nCount ) const [inline]
 

Returns the leftmost nCount characters from a CString.

int CString_::ReverseFind ( int ch ) const [inline]
 

Return the offset of the last character in the CString or -1.

CString_ CString_::Right ( int nCount ) const [inline]
 

Returns the rightmost nCount characters from a CString.

void CString_::SetAt ( int p,
char ch ) [inline]
 

Set the character at the specified position.

CString_::operator const char * ( ) const [inline]
 

return as a normal 'c' string.

const CString_ & CString_::operator+= ( const char * psz )
 

Concatenate two strings.

const CString_ & CString_::operator+= ( char ch )
 

Concatenate a string and a character.

const CString_ & CString_::operator+= ( const CString_ & string )
 

Concatenate two strings.

const CString_ & CString_::operator= ( const unsigned char * psz )
 

Assignment operator.

const CString_ & CString_::operator= ( const char * psz )
 

Assignment operator.

const CString_ & CString_::operator= ( const CString_ & stringSrc )
 

Assignment operator.


Friends And Related Function Documentation

CString_ operator+ ( const CString_ & string,
const char * lpsz ) [friend]
 

Concatenate two strings.


Member Data Documentation

size_t CString_::l [private]
 

The current length of the string.

size_t CString_::r [private]
 

The amount of memory currently allocated.

char * CString_::s [private]
 

Points to the actual string data.


The documentation for this class was generated from the following file:
Generated at Wed Nov 21 11:34:18 2001 for AnyConfig by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001