#include <MercuryString.h>
Public Types | |
enum | { npos = -1 } |
Public Member Functions | |
MString () | |
MString (int iPreAlloc) | |
MString (const char sIn) | |
MString (const char *sIn) | |
MString (const char *sIn, int iSize) | |
MString (const MString &rhs) | |
~MString () | |
const MString & | operator= (const MString &rhs) |
const MString & | operator= (const char *rhs) |
const MString | operator+ (const MString &rhs) const |
const MString | operator+ (const char *rhs) const |
const MString | operator+ (const char rhs) const |
const MString & | operator+= (const char *rhs) |
const MString & | operator+= (const MString &rhs) |
const MString & | operator+= (const char rhs) |
bool | operator== (const MString &rhs) |
bool | operator== (const char *rhs) |
bool | operator< (const MString &rhs) |
bool | operator> (const MString &rhs) |
operator const char * () const | |
const char * | c_str () const |
unsigned long | length () const |
unsigned long | size () const |
bool | empty () const |
void | append (const MString &app) |
void | append (const char app) |
void | append (const char *app) |
void | append (const char *app, int len) |
void | append (const char app, int len) |
Special: Append app len times. | |
void | assign (const MString &app) |
void | assign (const char *app) |
void | assign (const char *app, int len) |
int | find (const MString &tofind, int start=0) const |
int | rfind (const MString &tofind) const |
int | find_last_of (const MString &tofind) const |
int | find (const char *tofind, int start=0) const |
int | find (const char tofind, int start=0) const |
int | rfind (const char *tofind) const |
int | rfind (const char tofind) const |
int | find_last_of (const char *tofind) const |
const MString | substr (int iStart) const |
const MString | substr (int iStart, int iLength) const |
int | compare (const MString &cmp) const |
int | compare (const char *cmp) const |
int | compare (int start, int len, const MString &cmp) const |
int | compare (int start, int len, const char *cmp) const |
unsigned int | hash () const |
void | resize (unsigned int size) |
Private Attributes | |
char * | m_sCur |
unsigned int | m_iLen |
unsigned int | m_iAlloc |
Friends | |
bool | operator< (const MString &lhs, const MString &rhs) |
bool | operator> (const MString &lhs, const MString &rhs) |
Definition at line 5 of file MercuryString.h.
anonymous enum |
MString::MString | ( | ) |
Definition at line 24 of file MercuryString.cpp.
MString::MString | ( | int | iPreAlloc | ) |
Definition at line 32 of file MercuryString.cpp.
MString::MString | ( | const char | sIn | ) |
Definition at line 40 of file MercuryString.cpp.
MString::MString | ( | const char * | sIn | ) |
Definition at line 49 of file MercuryString.cpp.
MString::MString | ( | const char * | sIn, | |
int | iSize | |||
) |
Definition at line 57 of file MercuryString.cpp.
MString::MString | ( | const MString & | rhs | ) |
Definition at line 66 of file MercuryString.cpp.
MString::~MString | ( | ) |
Definition at line 75 of file MercuryString.cpp.
Definition at line 80 of file MercuryString.cpp.
const MString & MString::operator= | ( | const char * | rhs | ) |
Definition at line 91 of file MercuryString.cpp.
Definition at line 101 of file MercuryString.cpp.
const MString MString::operator+ | ( | const char * | rhs | ) | const |
Definition at line 112 of file MercuryString.cpp.
const MString MString::operator+ | ( | const char | rhs | ) | const |
Definition at line 126 of file MercuryString.cpp.
const MString & MString::operator+= | ( | const char * | rhs | ) |
Definition at line 137 of file MercuryString.cpp.
Definition at line 147 of file MercuryString.cpp.
const MString & MString::operator+= | ( | const char | rhs | ) |
Definition at line 156 of file MercuryString.cpp.
bool MString::operator== | ( | const MString & | rhs | ) |
Definition at line 165 of file MercuryString.cpp.
bool MString::operator== | ( | const char * | rhs | ) |
Definition at line 170 of file MercuryString.cpp.
bool MString::operator< | ( | const MString & | rhs | ) |
Definition at line 175 of file MercuryString.cpp.
bool MString::operator> | ( | const MString & | rhs | ) |
Definition at line 180 of file MercuryString.cpp.
MString::operator const char * | ( | ) | const [inline] |
Definition at line 30 of file MercuryString.h.
const char* MString::c_str | ( | ) | const [inline] |
Definition at line 32 of file MercuryString.h.
unsigned long MString::length | ( | ) | const [inline] |
Definition at line 33 of file MercuryString.h.
unsigned long MString::size | ( | ) | const [inline] |
Definition at line 34 of file MercuryString.h.
bool MString::empty | ( | ) | const [inline] |
Definition at line 35 of file MercuryString.h.
void MString::append | ( | const MString & | app | ) |
Definition at line 185 of file MercuryString.cpp.
void MString::append | ( | const char | app | ) |
Definition at line 193 of file MercuryString.cpp.
void MString::append | ( | const char * | app | ) |
Definition at line 201 of file MercuryString.cpp.
void MString::append | ( | const char * | app, | |
int | len | |||
) |
Definition at line 210 of file MercuryString.cpp.
void MString::append | ( | const char | app, | |
int | len | |||
) |
void MString::assign | ( | const MString & | app | ) |
Definition at line 226 of file MercuryString.cpp.
void MString::assign | ( | const char * | app | ) |
Definition at line 236 of file MercuryString.cpp.
void MString::assign | ( | const char * | app, | |
int | len | |||
) |
Definition at line 245 of file MercuryString.cpp.
int MString::find | ( | const MString & | tofind, | |
int | start = 0 | |||
) | const |
Definition at line 255 of file MercuryString.cpp.
int MString::rfind | ( | const MString & | tofind | ) | const |
Definition at line 261 of file MercuryString.cpp.
int MString::find_last_of | ( | const MString & | tofind | ) | const [inline] |
Definition at line 51 of file MercuryString.h.
int MString::find | ( | const char * | tofind, | |
int | start = 0 | |||
) | const |
Definition at line 275 of file MercuryString.cpp.
int MString::find | ( | const char | tofind, | |
int | start = 0 | |||
) | const |
Definition at line 295 of file MercuryString.cpp.
int MString::rfind | ( | const char * | tofind | ) | const |
Definition at line 281 of file MercuryString.cpp.
int MString::rfind | ( | const char | tofind | ) | const |
Definition at line 301 of file MercuryString.cpp.
int MString::find_last_of | ( | const char * | tofind | ) | const [inline] |
Definition at line 57 of file MercuryString.h.
const MString MString::substr | ( | int | iStart | ) | const |
Definition at line 307 of file MercuryString.cpp.
const MString MString::substr | ( | int | iStart, | |
int | iLength | |||
) | const |
Definition at line 312 of file MercuryString.cpp.
int MString::compare | ( | const MString & | cmp | ) | const |
Definition at line 317 of file MercuryString.cpp.
int MString::compare | ( | const char * | cmp | ) | const |
Definition at line 322 of file MercuryString.cpp.
int MString::compare | ( | int | start, | |
int | len, | |||
const MString & | cmp | |||
) | const |
Definition at line 327 of file MercuryString.cpp.
int MString::compare | ( | int | start, | |
int | len, | |||
const char * | cmp | |||
) | const |
Definition at line 332 of file MercuryString.cpp.
unsigned int MString::hash | ( | ) | const |
Definition at line 337 of file MercuryString.cpp.
void MString::resize | ( | unsigned int | size | ) |
Definition at line 351 of file MercuryString.cpp.
Definition at line 363 of file MercuryString.cpp.
Definition at line 368 of file MercuryString.cpp.
char* MString::m_sCur [private] |
Definition at line 77 of file MercuryString.h.
unsigned int MString::m_iLen [private] |
Definition at line 78 of file MercuryString.h.
unsigned int MString::m_iAlloc [private] |
Definition at line 79 of file MercuryString.h.