GClasses
GClasses::GStringChopper Class Reference

Detailed Description

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

#include <GString.h>

Public Member Functions

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

Protected Attributes

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

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

bool GClasses::GStringChopper::m_bDropLeadingWhitespace
protected
size_t GClasses::GStringChopper::m_nLen
protected
size_t GClasses::GStringChopper::m_nMaxLen
protected
size_t GClasses::GStringChopper::m_nMinLen
protected
char* GClasses::GStringChopper::m_pBuf
protected
const char* GClasses::GStringChopper::m_szString
protected