Inheritance diagram for Exponent::Basics::CString:

A string handling class. Takes care of most string handling duties, however, if you require path handling functions as well, please see
1.0.1 Fixed const correctness for operators
1.0.2 Added equalsIgnoringCase functions
1.0.3 Added replaceCharWithChar function
1.0.4 Added setStringWithFormat function
1.0.5 Added replaceCharWithString and replaceStringWithChar function
Definition at line 52 of file CString.hpp.
| Exponent::Basics::CString::CString | ( | const char * | string = " " |
) |
Construction with a C-style string
| string | The string you wish to store |
Referenced by emptyString(), and newEmptyString().
| Exponent::Basics::CString::CString | ( | const CString & | string | ) |
Copy construction
| string | The string to copy |
| virtual Exponent::Basics::CString::~CString | ( | ) | [virtual] |
Destruction
| virtual void Exponent::Basics::CString::appendString | ( | const CString & | string | ) | [virtual] |
Append a string to the end of this
| string | The stirng to append |
| virtual void Exponent::Basics::CString::appendString | ( | const char * | string | ) | [virtual] |
Append a string to the end of this
| string | The stirng to append |
| virtual void Exponent::Basics::CString::appendString | ( | const char | character | ) | [virtual] |
Append a single character to the end of this
| character | The character to append |
| virtual char Exponent::Basics::CString::characterAt | ( | const int | index | ) | const [virtual] |
Get the character at a specific index
| index | The index of the character you want |
| char | The character at the index you specified |
| static CString Exponent::Basics::CString::emptyString | ( | ) | [inline, static] |
Get a new empty string
| CString | The empty string |
Definition at line 265 of file CString.hpp.
References CString(), and CSTRING_NULL_STRING.
| virtual bool Exponent::Basics::CString::equals | ( | const CString & | string | ) | const [virtual] |
Do the strings match case important
| string | The string to compare against |
| bool | True if strings are equal, false otherwise |
| virtual bool Exponent::Basics::CString::equals | ( | const char * | other | ) | const [virtual] |
Do the strings match case important
| other | The string to compare against |
| bool | True if strings are equal, false otherwise |
| virtual bool Exponent::Basics::CString::equalsIgnoringCase | ( | const CString & | string | ) | const [virtual] |
Do the strings match ignoring case
| string | The string to compare against |
| bool | True if strings are equal, false otherwise |
| virtual bool Exponent::Basics::CString::equalsIgnoringCase | ( | const char * | other | ) | const [virtual] |
Do the strings match ignoring case
| other | The string to compare against |
| bool | True if strings are equal, false otherwise |
| virtual long Exponent::Basics::CString::findBackwards | ( | const char | character | ) | [virtual] |
Find the last occurance of a character
| character | The character to search for |
| long | -1 on failure, otherwise the index of last found |
| virtual long Exponent::Basics::CString::findForward | ( | const char | character | ) | [virtual] |
Find the first occurance of a character
| character | The character to search for |
| long | -1 on failure, otherwise the index of first found |
| long Exponent::Basics::CString::findSubString | ( | const CString & | string | ) |
Find a sub string
| string | The string to find |
| long | starting index of the sub string or -1 on error |
| virtual long Exponent::Basics::CString::getNumberOfCharacters | ( | ) | const [virtual] |
Get the number of characters in the string
| long | The number of characters in the string |
| virtual void Exponent::Basics::CString::getObjectDescription | ( | char * | string, | |
| const long | size | |||
| ) | const [virtual] |
Get a description of the object
| string | On return is filled with the description | |
| size | The size of the stirng |
Reimplemented from Exponent::Basics::CCountedObject.
| virtual const char* Exponent::Basics::CString::getString | ( | ) | const [virtual] |
Get a pointer to the string
| const | char* A pointer to the string |
| virtual void Exponent::Basics::CString::getString | ( | char * | buffer | ) | const [virtual] |
Get a copy of the string
| buffer | The buffer to fill (filled to CSTRING_SHORT_TEXT_LENGTH) |
| virtual void Exponent::Basics::CString::getString | ( | char * | buffer, | |
| const long | size | |||
| ) | const [virtual] |
Get a copy of the string
| buffer | The buffer to fill | |
| size | The size of the buffer |
| virtual CPascalString Exponent::Basics::CString::getStringAsPascalString | ( | ) | [virtual] |
Convert the string to a pascal string
| CPascalString* | The String as a pascal string. You are responsible for deleting the returned string |
| virtual CString Exponent::Basics::CString::getSubString | ( | const long | start, | |
| const long | end | |||
| ) | const [virtual] |
Get a sub string from the main string
| start | The starting index | |
| end | The ending index (is included in sub string) |
| CString | A new sub string |
| static bool Exponent::Basics::CString::isWhiteSpace | ( | const char | letter | ) | [static] |
Check if the character is a white space
| letter | The character to check |
| bool | True if whitespace, false otherwise |
| static CString* Exponent::Basics::CString::newEmptyString | ( | ) | [inline, static] |
Get a copy of the empty string
| CString* | The empty string. You are responsible for deleting memory on returned object |
Definition at line 259 of file CString.hpp.
References CString(), and CSTRING_NULL_STRING.
| virtual bool Exponent::Basics::CString::operator! | ( | ) | const [virtual] |
Check if the string is empty
| bool | true if string is empty, false otherwise |
| virtual bool Exponent::Basics::CString::operator!= | ( | const CString & | string | ) | const [virtual] |
Inequality operator
| string | The string to compare against |
| bool | True if strings are not equal, false otherwise |
| virtual bool Exponent::Basics::CString::operator!= | ( | const char * | string | ) | const [virtual] |
Inequality operator
| string | The string to compare against |
| bool | True if strings are not equal, false otherwise |
| virtual CString& Exponent::Basics::CString::operator+= | ( | const char * | string | ) | [virtual] |
Concatenate two strings
| string | The string to append to the end of this |
| CString& | A reference to this |
Reimplemented in Exponent::Basics::CSystemString.
Concatenate two strings
| string | The string to append to the end of this |
| CString& | A reference to this |
Reimplemented in Exponent::Basics::CSystemString.
| virtual CString& Exponent::Basics::CString::operator= | ( | const bool | value | ) | [virtual] |
Assignment operator Sets the string to "True" or "False"
| value | The value to copy |
| CString& | A reference to this |
| virtual CString& Exponent::Basics::CString::operator= | ( | const int | value | ) | [virtual] |
Assignment operator
| value | The value to copy |
| CString& | A reference to this |
| virtual CString& Exponent::Basics::CString::operator= | ( | const long | value | ) | [virtual] |
Assignment operator
| value | The value to copy |
| CString& | A reference to this |
| virtual CString& Exponent::Basics::CString::operator= | ( | const float | value | ) | [virtual] |
Assignment operator
| value | The value to copy |
| CString& | A reference to this |
| virtual CString& Exponent::Basics::CString::operator= | ( | const char * | string | ) | [virtual] |
Assignment operator
| string | The string to copy |
| CString& | A reference to this |
Reimplemented in Exponent::Basics::CSystemString.
Assignment operator
| string | The string to copy |
| CString& | A reference to this |
Assignment operator
| string | The string to copy |
| CString& | A reference to this |
| virtual bool Exponent::Basics::CString::operator== | ( | const CString & | string | ) | const [virtual] |
Equality operator
| string | The string to compare against |
| bool | True if strings are equal, false otherwise |
| virtual bool Exponent::Basics::CString::operator== | ( | const char * | equals | ) | const [virtual] |
Equality operator
| equals | The string to compare against |
| bool | True if strings are equal, false otherwise |
| virtual char Exponent::Basics::CString::operator[] | ( | const long | index | ) | const [virtual] |
Subscript operator
| index | The index of the character you would like |
| char | The character at the index |
| virtual void Exponent::Basics::CString::removeLastCharacter | ( | ) | [virtual] |
Delete the last character
| virtual void Exponent::Basics::CString::removeLeadingWhiteSpace | ( | ) | [virtual] |
Remove leading white space
| virtual void Exponent::Basics::CString::removeTrailingAndLeadingWhiteSpace | ( | ) | [virtual] |
Remove trailing and leading white space
| virtual void Exponent::Basics::CString::removeTrailingWhiteSpace | ( | ) | [virtual] |
Remove trailing white space
| virtual void Exponent::Basics::CString::replaceCharWithChar | ( | const char | characterToReplace, | |
| const char | characterToReplaceWith | |||
| ) | [virtual] |
Replace a character with another character
| characterToReplace | The character that will be replaced | |
| characterToReplaceWith | The character that will be used in the replacement |
| virtual void Exponent::Basics::CString::replaceCharWithString | ( | const char | characterToReplace, | |
| const CString & | stringToReplaceWith | |||
| ) | [virtual] |
Replace a character with a string
| characterToReplace | The character that will be replaced | |
| stringToReplaceWith | The string to replace with |
| virtual void Exponent::Basics::CString::replaceStringWithChar | ( | const char | characterToReplaceWith, | |
| const CString & | stringToReplace | |||
| ) | [virtual] |
Replace a given sub string with a character
| stringToReplace | The string that will be replaced | |
| characterToReplaceWith | The character to replace with |
| virtual void Exponent::Basics::CString::setString | ( | const CString & | string | ) | [virtual] |
Set the string
| string | The string to store |
| virtual void Exponent::Basics::CString::setString | ( | const char * | string | ) | [virtual] |
Set the string
| string | The string to store |
| virtual void Exponent::Basics::CString::setStringWithFormat | ( | const char * | text, | |
| ... | ||||
| ) | [virtual] |
Format a text string - Used in an sprintf style
| text | The text | |
| ... | The variables |
Referenced by Exponent::Midi::CMidi::getMidiNoteString().
| static double Exponent::Basics::CString::toDouble | ( | const char * | text | ) | [static] |
Convert the text string to a double
| text | The string to be converted |
| double | The string as a double, or 0 if failure |
| static float Exponent::Basics::CString::toFloat | ( | const char * | text | ) | [static] |
Convert the text string to a float
| text | The string to be converted |
| float | The string as a float, or 0 if failure |
| static int Exponent::Basics::CString::toInt | ( | const char * | text | ) | [static] |
Convert the text string to a int
| text | The string to be converted |
| int | The string as an int, or 0 if failure |
| static long Exponent::Basics::CString::toLong | ( | const char * | text | ) | [static] |
Convert the text string to a long
| text | The string to be converted |
| long | The string as a long, or 0 if failure |
| static char Exponent::Basics::CString::toLowerCase | ( | const char | letter | ) | [static] |
Change the case of a single character
| letter | The letter to change the case of |
| char | The character in lower case |
| virtual void Exponent::Basics::CString::toLowerCase | ( | ) | [virtual] |
Converts the string to all lowercase
| static char* Exponent::Basics::CString::toString | ( | const long | value | ) | [static] |
Convert a long to a string
| value | The value to be converted |
| char* | The coverted string. You are responsible for deleting memory on returned object |
| static char* Exponent::Basics::CString::toString | ( | const int | value | ) | [static] |
Convert an int to a string
| value | The value to be converted |
| char* | The coverted string. You are responsible for deleting memory on returned object |
| static char* Exponent::Basics::CString::toString | ( | const float | value | ) | [static] |
Convert a float to a string
| value | The value to be converted |
| char* | The coverted string. You are responsible for deleting memory on returned object |
| static char Exponent::Basics::CString::toUpperCase | ( | const char | letter | ) | [static] |
Change the case of a single character
| letter | The letter to change the case of |
| char | The character in upper case |
| virtual void Exponent::Basics::CString::toUpperCase | ( | ) | [virtual] |
Converts the string to all uppercase
const char Exponent::Basics::CString::CSTRING_EMPTY_STRING[3] [static] |
An empty string (set to " ")
Definition at line 67 of file CString.hpp.
const long Exponent::Basics::CString::CSTRING_LONG_TEXT_LENGTH = 1024 [static] |
A Long string
Definition at line 66 of file CString.hpp.
const long Exponent::Basics::CString::CSTRING_MIDDLE_TEXT_LENGTH = 256 [static] |
A Medium string
Definition at line 65 of file CString.hpp.
const char Exponent::Basics::CString::CSTRING_NULL_STRING[] [static] |
A null string (set to "\0")
Definition at line 68 of file CString.hpp.
Referenced by emptyString(), and newEmptyString().
const long Exponent::Basics::CString::CSTRING_SHORT_TEXT_LENGTH = 8 [static] |
A Short string
Definition at line 64 of file CString.hpp.
long Exponent::Basics::CString::m_numberOfCharacters [protected] |
The number of characters, not including terminator
Definition at line 516 of file CString.hpp.
char* Exponent::Basics::CString::m_string [protected] |
The string
Definition at line 515 of file CString.hpp.