This mostly concrete class implements a "fixed storage" String Type.
This class is built on the assumption that "behind-the-scenes" dynamic memory allocation is a bad thing (for a long list of reasons)! Therefore, NO memory allocation is done in this base class. The sub-class is responsible for allocating ALL of storage used by the FString_.
NOTE: All methods that "modify" the string guarantee that the internal storage limit is not exceeded and the string is always NULL terminated. The "incoming" data is silently truncated if the data size exceeds the storage limit.
|
void | copyIn (const char *string, int n) |
| see Cpl::Text::String
|
|
void | appendTo (const char *string, int n) |
| see Cpl::Text::String
|
|
void | insertAt (int insertOffset, const char *stringToInsert) |
| see Cpl::Text::String
|
|
int | maxLength () const |
| see Cpl::Text::String
|
|
|
Cpl::Text::String & | operator= (int num) |
| Assignment.
|
|
Cpl::Text::String & | operator= (unsigned int num) |
| Assignment.
|
|
Cpl::Text::String & | operator= (long num) |
| Assignment.
|
|
Cpl::Text::String & | operator= (long long num) |
| Assignment.
|
|
Cpl::Text::String & | operator= (unsigned long num) |
| Assignment.
|
|
Cpl::Text::String & | operator= (unsigned long long num) |
| Assignment.
|
|
|
Cpl::Text::String & | operator+= (int num) |
| Append.
|
|
Cpl::Text::String & | operator+= (unsigned int num) |
| Append.
|
|
Cpl::Text::String & | operator+= (long num) |
| Append.
|
|
Cpl::Text::String & | operator+= (long long num) |
| Append.
|
|
Cpl::Text::String & | operator+= (unsigned long num) |
| Append.
|
|
Cpl::Text::String & | operator+= (unsigned long long num) |
| Append.
|
|
void | clear () |
| See Cpl::Text::String.
|
|
| operator char () const |
| See Cpl::Text::String.
|
|
int | length () const |
| See Cpl::Text::String.
|
|
bool | isEmpty () const |
| See Cpl::Text::String.
|
|
bool | truncated () const |
| See Cpl::Text::String.
|
|
bool | operator== (const char *string) const |
| See Cpl::Text::String.
|
|
bool | operator== (const String &string) const |
| See Cpl::Text::String.
|
|
bool | operator!= (const char *string) const |
| See Cpl::Text::String.
|
|
bool | operator!= (const String &string) const |
| See Cpl::Text::String.
|
|
bool | isEqualIgnoreCase (const char *string) const |
| See Cpl::Text::String.
|
|
int | compare (const char *string) const |
| See Cpl::Text::String.
|
|
int | compareIgnoreCase (const char *string) const |
| See Cpl::Text::String.
|
|
bool | operator== (char c) const |
| See Cpl::Text::String.
|
|
bool | isEqualSubstring (int startpos, int endpos, const char *string) const |
| See Cpl::Text::String.
|
|
bool | isEqualSubstringIgnoreCase (int startpos, int endpos, const char *string) const |
| See Cpl::Text::String.
|
|
bool | startsWith (const char *string) const |
| See Cpl::Text::String.
|
|
bool | startsWith (const char *string, int startOffset) const |
| See Cpl::Text::String.
|
|
bool | endsWith (const char *string) const |
| See Cpl::Text::String.
|
|
void | format (const char *format,...) |
| See Cpl::Text::String.
|
|
void | formatAppend (const char *format,...) |
| See Cpl::Text::String.
|
|
void | formatOpt (bool appendFlag, const char *format,...) |
| See Cpl::Text::String.
|
|
void | vformat (const char *format, va_list ap) |
| See Cpl::Text::String.
|
|
void | vformatAppend (const char *format, va_list ap) |
| See Cpl::Text::String.
|
|
void | vformatOpt (bool appendFlag, const char *format, va_list ap) |
| See Cpl::Text::String.
|
|
int | indexOf (char c) const |
| See Cpl::Text::String.
|
|
int | indexOf (char c, int startpos) const |
| See Cpl::Text::String.
|
|
int | indexOf (const char *str) const |
| See Cpl::Text::String.
|
|
int | indexOf (const char *str, int startpos) const |
| See Cpl::Text::String.
|
|
int | lastIndexOf (char c) const |
| See Cpl::Text::String.
|
|
int | count (char c) const |
| See Cpl::Text::String.
|
|
const char * | toUpper () |
| See Cpl::Text::String.
|
|
const char * | toLower () |
| See Cpl::Text::String.
|
|
void | removeLeadingSpaces () |
| See Cpl::Text::String.
|
|
void | removeTrailingSpaces () |
| See Cpl::Text::String.
|
|
void | removeLeadingChars (const char *charsSet) |
| See Cpl::Text::String.
|
|
void | removeTrailingChars (const char *charsSet) |
| See Cpl::Text::String.
|
|
void | cut (int startpos, int endpos) |
| See Cpl::Text::String.
|
|
void | trimRight (int n) |
| See Cpl::Text::String.
|
|
void | setChar (int atPosition, char newchar) |
| See Cpl::Text::String.
|
|
int | replace (char targetChar, char newChar) |
| See Cpl::Text::String.
|
|
const char * | getString () const |
| See Cpl::Text::String.
|
|
char * | getBuffer (int &maxAllowedLength) |
| See Cpl::Text::String.
|
|
Cpl::Text::String & | operator= (const String &string) |
| Assignment.
|
|
Cpl::Text::String & | operator= (const char *string) |
| Assignment.
|
|
Cpl::Text::String & | operator= (char c) |
| Assignment.
|
|
Cpl::Text::String & | operator+= (const String &string) |
| Append.
|
|
Cpl::Text::String & | operator+= (const char *string) |
| Append.
|
|
Cpl::Text::String & | operator+= (char c) |
| Append.
|
|
int | compareKey (const Key &key) const |
| See Cpl::Container::Key.
|
|
const void * | getRawKey (unsigned *returnRawKeyLenPtr=0) const |
| See Cpl::Container::Key.
|
|
virtual | ~String () |
| Virtual destructor!
|
|
| operator const char * () const |
| Cast to read-only character string pointer.
|
|
const char * | operator() () const |
| Returns a Read-only pointer to the "raw" (short-hand for getString())
|
|
char | operator[] (int i) const |
| Returns the specified character. If n is out-bounds, then '\0' is returned.
|
|
int | availLength () |
| Returns the available space left in the internal buffer.
|
|
void | trimLeft (int n) |
| Removes 'n' characters from the start-of-string.
|
|
virtual | ~Key () |
| Ensure a Virtual destructor.
|
|
virtual int | compareKey (const Key &key) const =0 |
| Key Compare function.
|
|
|
| FString_ (const char *string, char *internalString, int maxLen) |
| Constructor.
|
|
| FString_ (char c, char *internalString, int maxLen) |
| Constructor.
|
|
| FString_ (int num, char *internalString, int maxLen) |
| Constructor.
|
|
| FString_ (unsigned num, char *internalString, int maxLen) |
| Constructor.
|
|
| FString_ (long num, char *internalString, int maxLen) |
| Constructor.
|
|
| FString_ (long long num, char *internalString, int maxLen) |
| Constructor.
|
|
| FString_ (unsigned long num, char *internalString, int maxLen) |
| Constructor.
|
|
| FString_ (unsigned long long num, char *internalString, int maxLen) |
| Constructor.
|
|
| String_ (char *internalStringPtr) |
| Constructor.
|
|
void | validateSizeAfterFormat (int availableLen, int formattedLen, int maxlen) |
| Sets the truncated flag if needed and insures string is null terminated.
|
|