This template class represents a NULL terminated string of a specific length.
More...
template<int S>
class Cpl::Text::FString< S >
This template class represents a NULL terminated string of a specific length.
The size (aka in the internal storage) of string cannot be changed. Any 'write' operations that exceed the length of the internal storage - the results are silently truncated and the string is ALWAYS left in null terminated state.
Template Args: S:= Max Size of the String WITHOUT the null terminator!
NOTE: See base class - String - for a complete listing/description of the class's methods.
|
| | FString (const FString< S > &string) |
| | Constructor.
|
| |
| | FString (const Cpl::Text::String &string) |
| | Constructor.
|
| |
| | FString (const char *string="") |
| | Constructor.
|
| |
| | FString (char c) |
| | Constructor.
|
| |
| | FString (int num) |
| | Constructor.
|
| |
| | FString (unsigned num) |
| | Constructor.
|
| |
| | FString (long num) |
| | Constructor.
|
| |
| | FString (long long num) |
| | Constructor.
|
| |
| | FString (unsigned long num) |
| | Constructor.
|
| |
| | FString (unsigned long long num) |
| | Constructor.
|
| |
| Cpl::Text::String & | operator= (const FString< S > &string) |
| | Assignment.
|
| |
| Cpl::Text::String & | operator+= (const FString< S > &string) |
| | Append.
|
| |
| 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.
|
| |
| int | m_internalMaxlen |
| | Maximum length of the internal string (not including the null terminator)
|
| |
| bool | m_truncated |
| | Flag to track when the internal string get truncated.
|
| |
| char * | m_strPtr |
| | Pointer to the actual internal string.
|
| |
| static char | m_noMemory [1] |
| | Empty string that is used to return a 'string' when my internal string is not valid.
|
| |