GClasses

GClasses::GStringChopper Class Reference

This class chops a big string at word breaks so you can display it intelligently on multiple lines. More...

#include <GString.h>

List of all members.

Public Member Functions

 GStringChopper (const char *szString, size_t nMinLength, size_t nMaxLength, bool bDropLeadingWhitespace)
 ~GStringChopper ()
void reset (const char *szString)
 Starts over with szString.
const char * next ()
 Returns NULL when there are no more lines left.

Protected Attributes

const char * m_szString
size_t m_nLen
size_t m_nMaxLen
size_t m_nMinLen
char * m_pBuf
bool m_bDropLeadingWhitespace

Detailed Description

This class chops a big string at word breaks so you can display it intelligently on multiple lines.


Constructor & Destructor Documentation

GClasses::GStringChopper::GStringChopper ( const char *  szString,
size_t  nMinLength,
size_t  nMaxLength,
bool  bDropLeadingWhitespace 
)
GClasses::GStringChopper::~GStringChopper ( )

Member Function Documentation

const char* GClasses::GStringChopper::next ( )

Returns NULL when there are no more lines left.

void GClasses::GStringChopper::reset ( const char *  szString)

Starts over with szString.


Member Data Documentation

const char* GClasses::GStringChopper::m_szString [protected]