|
Public Types |
| enum | Alignment { ALIGN_DEFAULT = 0,
ALIGN_LEFT = 0x01,
ALIGN_CENTER = 0x02,
ALIGN_RIGHT = 0x03
} |
Public Member Functions |
|
| HString (StringPtr pstr) |
|
| HString (const HString &rhs) |
| HString & | Align (HString::Alignment align, uint32 uWidth, Text chPad= ' ') throw () |
| | Align the string to a given width.
|
| ErrCode | Append (StringPtr pstr) |
| | Appends one string onto the end of this string.
|
| int32 | Compare (const HString &rhs, bool bCase=true) const |
| | Compares the string to another HString object.
|
| int32 | Compare (StringPtr pstr, bool bCase=true) const |
| | Compares the string to a regular StringPtr.
|
| int32 | Find (Text ch, uint32 uStart=0) const |
| | Searches for the first ocurrence of a character.
|
| int32 | Find (StringPtr pstr, uint32 uStart=0) const |
| | Searches for the first ocurrence of a string.
|
| int32 | FindLast (Text ch) const |
| | Searches for the last ocurrence of a character.
|
| int32 | FindLast (StringPtr pstr) const |
| | Searches for the last ocurrence of a string.
|
| int32 | Format (StringPtr pstrFormat,...) |
| | Format the string using printf()-style arguments.
|
| int32 | FormatV (StringPtr pstrFormat, va_list &vaList) |
| | Format the string using printf()-style arguments.
|
| HString | Left (uint32 uCount) const |
| | Returns a portion of the string.
|
| HString & | MakeLower (void) |
| | Converts the entire string to lower case.
|
| HString & | MakeUpper (void) |
| | Converts the entire string to upper case (capitals).
|
| HString | Mid (uint32 uStart, int32 nCount=-1) const |
| | Returns a portion of the string.
|
| int32 | Replace (Text chOld, Text chNew) |
| | Replaces all ocurrences of one character with another.
|
| HString | Right (int32 nCount) const |
| | Returns a portion of the string.
|
| HString & | Trim (void) |
| | Trims all whitespace--front and back--from the string.
|
| HString & | TrimLeft (void) |
| | Trims all whitespace at the front of the string.
|
| HString & | TrimRight (void) |
| | Trims all whitespace at the end of the string.
|
| Text | GetAt (uint32 udx) const |
| | Returns the character at a given offset, or '\0' if offset is out of bounds.
|
| void | SetAt (uint32 udx, Text ch) |
| | Sets the character at a given offset.
|
|
void | SetEmpty (void) |
| | Sets the string to an empty (zero-length) string.
|
| int32 | GetLength (void) const |
| | Returns the current length of the string.
|
| StringPtr | GetString (void) const |
| | Returns a pointer to the underlying string.
|
| int32 | GetValue (void) const |
| | Returns an integer value for the string.
|
| bool | IsEmpty (void) const |
| | Returns true if the string is empty, i.e., zero-length.
|
| bool | IsNotEmpty (void) const |
| | Returns true if the string is NOT empty, i.e., at least one character.
|
|
| operator StringPtr (void) const |
|
Text | operator[] (int index) const |
|
bool | operator== (StringPtr pstr) const |
|
bool | operator== (const HString &rhs) const |
|
bool | operator!= (StringPtr pstr) const |
|
bool | operator!= (const HString &rhs) const |
|
bool | operator< (StringPtr pstr) const |
|
bool | operator< (const HString &rhs) const |
|
bool | operator<= (StringPtr pstr) const |
|
bool | operator<= (const HString &rhs) const |
|
bool | operator> (StringPtr pstr) const |
|
bool | operator> (const HString &rhs) const |
|
bool | operator>= (StringPtr pstr) const |
|
bool | operator>= (const HString &rhs) const |
|
HString & | operator= (StringPtr pstr) |
|
HString & | operator= (const HString &rhs) |
|
HString & | operator= (const std::string &rhs) |
|
HString & | operator+= (StringPtr pstr) |
|
HString & | operator+= (const HString &rhs) |
Static Public Member Functions |
| static uint32 | Hash (StringPtr pstr) |
| | Hashes the string to a 32-bit numeric value.
|
Protected Member Functions |
| bool | isValidIndex (const uint32 udx) const |
| | Returns true if the index is valid for the current string.
|
Protected Attributes |
|
std::string | m_str |
Friends |
|
HString | operator+ (const HString &str1, const HString &str2) |
|
HString | operator+ (const HString &str1, StringPtr pstr2) |
|
HString | operator+ (StringPtr pstr1, const HString &str2) |