GString Class Reference

#include <GString.h>


Public Member Functions

 GString ()
 GString (const char *sA)
 GString (const char *sA, int lengthA)
 GString (GString *str, int idx, int lengthA)
 GString (GString *str)
GStringcopy ()
 GString (GString *str1, GString *str2)
 ~GString ()
int getLength ()
char * getCString ()
char getChar (int i)
void setChar (int i, char c)
GStringclear ()
GStringappend (char c)
GStringappend (GString *str)
GStringappend (const char *str)
GStringappend (const char *str, int lengthA)
GStringinsert (int i, char c)
GStringinsert (int i, GString *str)
GStringinsert (int i, const char *str)
GStringinsert (int i, const char *str, int lengthA)
GStringdel (int i, int n=1)
GStringupperCase ()
GStringlowerCase ()
int cmp (GString *str)
int cmpN (GString *str, int n)
int cmp (const char *sA)
int cmpN (const char *sA, int n)

Static Public Member Functions

static GStringfromInt (int x)

Private Member Functions

void resize (int length1)

Private Attributes

int length
char * s


Detailed Description

Definition at line 24 of file GString.h.


Constructor & Destructor Documentation

GString::GString (  ) 

Referenced by copy().

GString::GString ( const char *  sA  ) 

GString::GString ( const char *  sA,
int  lengthA 
)

GString::GString ( GString str,
int  idx,
int  lengthA 
)

GString::GString ( GString str  ) 

GString::GString ( GString str1,
GString str2 
)

GString::~GString (  ) 


Member Function Documentation

GString* GString::copy (  )  [inline]

Definition at line 42 of file GString.h.

References GString().

00042 { return new GString(this); }

static GString* GString::fromInt ( int  x  )  [static]

int GString::getLength (  )  [inline]

Definition at line 54 of file GString.h.

References length.

00054 { return length; }

char* GString::getCString (  )  [inline]

Definition at line 57 of file GString.h.

References s.

Referenced by cmp(), and cmpN().

00057 { return s; }

char GString::getChar ( int  i  )  [inline]

Definition at line 60 of file GString.h.

References s.

00060 { return s[i]; }

void GString::setChar ( int  i,
char  c 
) [inline]

Definition at line 63 of file GString.h.

References s.

00063 { s[i] = c; }

GString* GString::clear (  ) 

GString* GString::append ( char  c  ) 

GString* GString::append ( GString str  ) 

GString* GString::append ( const char *  str  ) 

GString* GString::append ( const char *  str,
int  lengthA 
)

GString* GString::insert ( int  i,
char  c 
)

GString* GString::insert ( int  i,
GString str 
)

GString* GString::insert ( int  i,
const char *  str 
)

GString* GString::insert ( int  i,
const char *  str,
int  lengthA 
)

GString* GString::del ( int  i,
int  n = 1 
)

GString* GString::upperCase (  ) 

GString* GString::lowerCase (  ) 

int GString::cmp ( GString str  )  [inline]

Definition at line 89 of file GString.h.

References getCString(), and s.

00089 { return strcmp(s, str->getCString()); }

int GString::cmpN ( GString str,
int  n 
) [inline]

Definition at line 90 of file GString.h.

References getCString(), and s.

00090 { return strncmp(s, str->getCString(), n); }

int GString::cmp ( const char *  sA  )  [inline]

Definition at line 91 of file GString.h.

References s.

00091 { return strcmp(s, sA); }

int GString::cmpN ( const char *  sA,
int  n 
) [inline]

Definition at line 92 of file GString.h.

References s.

00092 { return strncmp(s, sA, n); }

void GString::resize ( int  length1  )  [private]


Field Documentation

int GString::length [private]

Definition at line 96 of file GString.h.

Referenced by getLength().

char* GString::s [private]

Definition at line 97 of file GString.h.

Referenced by cmp(), cmpN(), getChar(), getCString(), and setChar().


The documentation for this class was generated from the following file:
Generated on Fri Jan 9 14:45:37 2009 for libextractor by  doxygen 1.5.1