class MbString


Public Fields

PFSTRUCT_DECLARE

Public Methods

void deleteSubString(int startChar, int endChar = -1)
Deletes the characters from startChar to endChar, inclusive, from the string
int getLength()
Returns length of string
const char* getString()
Returns pointer to the character string
MbString getSubString(int startChar, int endChar = -1)
Returns new string representing sub-string from startChar to endChar, inclusive
static u_long hash(const char *s)
u_long hash()
Returns a reasonable hash key for string
void makeEmpty(MbBool freeOld = TRUE)
Sets string to be the empty string ("")
MbString(const MbString &str)
MbString(const char *str)
int operator !()
Unary "not" operator; returns TRUE if string is empty ("")
friend int operator !=(const char *s, const MbString &str)
friend int operator !=(const MbString &str, const char *s)
Inequality operator for MbString/char* and MbString/MbString comparison
friend int operator !=(const MbString &str1, const MbString &str2)
friend MbString operator +(const MbString &str1, const MbString &str2)
MbString& operator +=(const char *c_str)
Concatenation operator "+=" for string, MbString
MbString& operator +=(const MbString &str)
MbString& operator =(const MbString &str)
MbString& operator =(const char *str)
Assignment operator for character string, MbString
friend int operator ==(const MbString &str1, const MbString &str2)
friend int operator ==(const char *s, const MbString &str)
friend int operator ==(const MbString &str, const char *s)
Equality operator for MbString/char* and MbString/MbString comparison
~MbString()
Destructor

Private Fields

char staticStorage[MW_STRING_STATIC_STORAGE_SIZE]
int storageSize
char* string

Private Methods

void expand(int bySize)

Documentation

MbString(const char *str)

MbString(const MbString &str)

~MbString()
Destructor

u_long hash()
Returns a reasonable hash key for string

int getLength()
Returns length of string

void makeEmpty(MbBool freeOld = TRUE)
Sets string to be the empty string (""). If freeOld is TRUE (default), any old storage is freed up

const char* getString()
Returns pointer to the character string

MbString& operator =(const char *str)
Assignment operator for character string, MbString

MbString& operator =(const MbString &str)

MbString& operator +=(const char *c_str)
Concatenation operator "+=" for string, MbString

MbString& operator +=(const MbString &str)

friend MbString operator +(const MbString &str1, const MbString &str2)

int operator !()
Unary "not" operator; returns TRUE if string is empty ("")

friend int operator ==(const MbString &str, const char *s)
Equality operator for MbString/char* and MbString/MbString comparison

friend int operator ==(const char *s, const MbString &str)

friend int operator ==(const MbString &str1, const MbString &str2)

friend int operator !=(const MbString &str, const char *s)
Inequality operator for MbString/char* and MbString/MbString comparison

friend int operator !=(const char *s, const MbString &str)

friend int operator !=(const MbString &str1, const MbString &str2)

static u_long hash(const char *s)

void deleteSubString(int startChar, int endChar = -1)
Deletes the characters from startChar to endChar, inclusive, from the string. If endChar is -1 (the default), all characters from startChar until the end are deleted.

MbString getSubString(int startChar, int endChar = -1)
Returns new string representing sub-string from startChar to endChar, inclusive. If endChar is -1 (the default), the sub-string from startChar until the end is returned.

PFSTRUCT_DECLARE

char* string

int storageSize

char staticStorage[MW_STRING_STATIC_STORAGE_SIZE]

void expand(int bySize)


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de