|
| | GenericString () |
| | Create an empty string. More...
|
| |
| | GenericString (Char character) |
| | Create a string consisting of a single character. More...
|
| |
| | GenericString (const Char *array) |
| | Create a string from a NULL-terminated character array. More...
|
| |
| | GenericString (const UTF8Char *array) |
| | Create a string from a NULL-terminated character array. More...
|
| |
| | GenericString (const UTF16Char *array) |
| | Create a string from a NULL-terminated character array. More...
|
| |
| | GenericString (const UTF32Char *array) |
| | Create a string from a NULL-terminated character array. More...
|
| |
| | GenericString (const Char *array, Size length) |
| | Create a string from a character array with the specified length. More...
|
| |
| | GenericString (const UTF8Char *array, Size length) |
| | Create a string from a character array with the specified length. More...
|
| |
| | GenericString (const UTF16Char *array, Size length) |
| | Create a string from a character array with the specified length. More...
|
| |
| | GenericString (const UTF32Char *array, Size length) |
| | Create a string from a character array with the specified length. More...
|
| |
| | GenericString (const GenericString &other) |
| | Create a copy of the specified other string. More...
|
| |
| template<typename OtherCharType > |
| | GenericString (const GenericString< OtherCharType > &other) |
| | Create a copy of the specified other string with a different character type. More...
|
| |
| | GenericString (Bool boolean) |
| | Create a new boolean literal string for the specified value. More...
|
| |
| | GenericString (Short number, Size base=10) |
| | Create a string which represents the specified integer number in the given base system. More...
|
| |
| | GenericString (UShort number, Size base=10) |
| | Create a string which represents the specified integer number in the given base system. More...
|
| |
| | GenericString (Int number, Size base=10) |
| | Create a string which represents the specified integer number in the given base system. More...
|
| |
| | GenericString (UInt number, Size base=10) |
| | Create a string which represents the specified integer number in the given base system. More...
|
| |
| | GenericString (Long number, Size base=10) |
| | Create a string which represents the specified integer number in the given base system. More...
|
| |
| | GenericString (ULong number, Size base=10) |
| | Create a string which represents the specified integer number in the given base system. More...
|
| |
| | GenericString (LongLong number, Size base=10) |
| | Create a string which represents the specified integer number in the given base system. More...
|
| |
| | GenericString (ULongLong number, Size base=10) |
| | Create a string which represents the specified integer number in the given base system. More...
|
| |
| | GenericString (Float number) |
| | Create a string which represents the specified floating-point number with default formating. More...
|
| |
| | GenericString (Float number, Size numDecimalPlaces, Size base=10, Bool allowScientific=true) |
| | Create a string which represents the specified floating-point number in the given base system. More...
|
| |
| | GenericString (Double number) |
| | Create a string which represents the specified double floating-point number with default formating. More...
|
| |
| | GenericString (Double number, Size numDecimalPlaces, Size base=10, Bool allowScientific=true) |
| | Create a string which represents the specified double floating-point number in the given base system. More...
|
| |
| | ~GenericString () |
| | Destroy this string, releasing its internal character buffer if the reference count is 0. More...
|
| |
| GenericString & | operator= (const GenericString &other) |
| | Assign the contents of another string to this string. More...
|
| |
| Bool | equals (const GenericString &other) const |
| | Return whether or not this string is exactly equal to another. More...
|
| |
| Bool | equalsIgnoreCase (const GenericString &other) const |
| | Return whether or not this string is equal to another if letter case is ignored. More...
|
| |
| Bool | equals (const CharType *characters) const |
| | Return whether or not this string is exactly equal to a NULL-terminated character string. More...
|
| |
| Bool | equals (const CharType *characters, Size numCharacters) const |
| | Return whether or not this string is exactly equal to a character string of the given length. More...
|
| |
| Bool | equalsIgnoreCase (const CharType *characters) const |
| | Return whether or not this string is equal to a NULL-terminated character string if letter case is ignored. More...
|
| |
| Bool | equalsIgnoreCase (const CharType *characters, Size numCharacters) const |
| | Return whether or not this string is equal to a character string if letter case is ignored. More...
|
| |
| Bool | operator== (const GenericString &other) const |
| | Return whether or not this string is exactly equal to another. More...
|
| |
| Bool | operator!= (const GenericString &other) const |
| | Return whether or not this string is not equal to another. More...
|
| |
| Bool | operator== (const CharType *other) const |
| | Return whether or not this string is exactly equal to a NULL-terminated character string. More...
|
| |
| Bool | operator!= (const CharType *other) const |
| | Return whether or not this string is not equal to a NULL-terminated character string. More...
|
| |
| Int | compareTo (const GenericString &other) const |
| | Return an integer indicating the lexical order of this string when compared to another. More...
|
| |
| Int | compareToIgnoreCase (const GenericString &other) const |
| | Return an integer indicating the lexical order of this string when compared to another, ignoring letter case. More...
|
| |
| Int | compareTo (const CharType *characters) const |
| | Return an integer indicating the lexical order of this string when compared to a C-string. More...
|
| |
| Int | compareToIgnoreCase (const CharType *characters) const |
| | Return an integer indicating the lexical order of this string when compared to a C-string, ignoring letter case. More...
|
| |
| Bool | operator< (const GenericString &other) const |
| | Return whether or not this string comes before another one in the lexical order. More...
|
| |
| Bool | operator> (const GenericString &other) const |
| | Return whether or not this string comes after another one in the lexical order. More...
|
| |
| Bool | operator<= (const GenericString &other) const |
| | Return whether or not this string comes before or is the same as another one in the lexical order. More...
|
| |
| Bool | operator>= (const GenericString &other) const |
| | Return whether or not this string comes after or is the same as another one in the lexical order. More...
|
| |
| Bool | operator< (const CharType *characters) const |
| | Return whether or not this string comes before a C-string in the lexical order. More...
|
| |
| Bool | operator> (const CharType *characters) const |
| | Return whether or not this string comes after a C-string in the lexical order. More...
|
| |
| Bool | operator<= (const CharType *characters) const |
| | Return whether or not this string comes before or is the same as a C-string in the lexical order. More...
|
| |
| Bool | operator>= (const CharType *characters) const |
| | Return whether or not this string comes after or is the same as a C-string in the lexical order. More...
|
| |
| Bool | operator<< (const GenericString &other) const |
| | Return whether or not this string comes before another one in the lexical order, ignoring letter case. More...
|
| |
| Bool | operator>> (const GenericString &other) const |
| | Return whether or not this string comes after another one in the lexical order, ignoring letter case. More...
|
| |
| Bool | operator<<= (const GenericString &other) const |
| | Return whether or not this string comes before or is the same as another one in the lexical order, ignoring letter case. More...
|
| |
| Bool | operator>>= (const GenericString &other) const |
| | Return whether or not this string comes after or is the same as another one in the lexical order, ignoring letter case. More...
|
| |
| Bool | operator<< (const CharType *characters) const |
| | Return whether or not this string comes before a C-string in the lexical order, ignoring letter case. More...
|
| |
| Bool | operator>> (const CharType *characters) const |
| | Return whether or not this string comes before a C-string in the lexical order, ignoring letter case. More...
|
| |
| Bool | operator<<= (const CharType *characters) const |
| | Return whether or not this string comes before or is the same as a C-string in the lexical order, ignoring letter case. More...
|
| |
| Bool | operator>>= (const CharType *characters) const |
| | Return whether or not this string comes after or is the same as a C-string in the lexical order, ignoring letter case. More...
|
| |
| Bool | contains (const GenericString &other) const |
| | Return whether or not this string contains another string as a substring. More...
|
| |
| Bool | containsIgnoreCase (const GenericString &other) const |
| | Return whether or not this string contains another string as a substring if letter case is ignored. More...
|
| |
| Bool | contains (const CharType *characters) const |
| | Return whether or not this string contains another NULL-terminated string as a substring. More...
|
| |
| Bool | containsIgnoreCase (const CharType *characters) const |
| | Return whether or not this string contains another NULL-terminated string as a substring if letter case is ignored. More...
|
| |
| Bool | contains (const CharType *characters, Size numCharacters) const |
| | Return whether or not this string contains another string as a substring. More...
|
| |
| Bool | containsIgnoreCase (const CharType *characters, Size numCharacters) const |
| | Return whether or not this string contains another string as a substring if letter case is ignored. More...
|
| |
| GenericString | operator+ (const GenericString &other) const |
| |
| GenericString | operator+ (const Char *characters) const |
| |
| GenericString | operator+ (Char character) const |
| |
| GenericString | operator+ (Short value) const |
| |
| GenericString | operator+ (UShort value) const |
| |
| GenericString | operator+ (Int value) const |
| |
| GenericString | operator+ (UInt value) const |
| |
| GenericString | operator+ (Long value) const |
| |
| GenericString | operator+ (ULong value) const |
| |
| GenericString | operator+ (LongLong value) const |
| |
| GenericString | operator+ (ULongLong value) const |
| |
| | operator Int () const |
| | Cast this string to an integer, returning math::nan<Int32>() if the conversion fails. More...
|
| |
| | operator UInt () const |
| | Cast this string to an integer, returning math::nan<UInt32>() if the conversion fails. More...
|
| |
| | operator Long () const |
| | Cast this string to an integer, returning math::nan<Int32>() if the conversion fails. More...
|
| |
| | operator ULong () const |
| | Cast this string to an integer, returning math::nan<UInt32>() if the conversion fails. More...
|
| |
| | operator LongLong () const |
| | Cast this string to an integer, returning math::nan<Int64>() if the conversion fails. More...
|
| |
| | operator ULongLong () const |
| | Cast this string to an integer, returning math::nan<UInt64>() if the conversion fails. More...
|
| |
| | operator Float () const |
| | Cast this string to a floating-point number, returning math::nan<Float>() if the conversion fails. More...
|
| |
| | operator Double () const |
| | Cast this string to a double floating-point number, returning math::nan<Double>() if the conversion fails. More...
|
| |
| Bool | toBool (Bool &value) const |
| | Convert this string to a boolean value, returning whether or not the conversion was successful. More...
|
| |
| Bool | toFloat (Float &value) const |
| | Convert this string to a float value, returning whether or not the conversion was successful. More...
|
| |
| Bool | toDouble (Double &value) const |
| | Convert this string to a double value, returning whether or not the conversion was successful. More...
|
| |
| Bool | toInt (Int &value) const |
| | Convert this string to an integer value, returning whether or not the conversion was successful. More...
|
| |
| Bool | toUInt (UInt32 &value) const |
| | Convert this string to an unsigned integer value, returning TRUE if the conversion was successful. More...
|
| |
| Bool | toInt32 (Int32 &value) const |
| | Convert this string to a 32-bit integer value, returning whether or not the conversion was successful. More...
|
| |
| Bool | toUInt32 (UInt32 &value) const |
| | Convert this string to a 32-bit unsigned integer value, returning TRUE if the conversion was successful. More...
|
| |
| Bool | toInt64 (Int64 &value) const |
| | Convert this string to a 64-bit integer value, returning whether or not the conversion was successful. More...
|
| |
| Bool | toUInt64 (UInt64 &value) const |
| | Convert this string to a 64-bit unsigned integer value, returning TRUE if the conversion was successful. More...
|
| |
| template<typename T > |
| Bool | toNumber (T &value) const |
| | Convert this string to a templated number value, returning TRUE if the conversion was successful. More...
|
| |
| Bool | isANumber () const |
| | Return whether or not this string represents a valid number. More...
|
| |
| CharType | get (Index index) const |
| | Return the character at the specified index in this string. More...
|
| |
| CharType | operator[] (Index index) const |
| | Return the character at the specified index in this string. More...
|
| |
| CharType | operator() (Index index) const |
| | Return the character at the specified index in this string. More...
|
| |
| GenericString | getSubString (Index start, Size number) const |
| | Return a sub-string of this string, specified by the start index and number of code points (characters). More...
|
| |
| const CharType * | getCString () const |
| | Return a pointer to a NULL-terminated character array representing this string. More...
|
| |
| const CharType * | getPointer () const |
| | Return a pointer to a NULL-terminated character array representing this string. More...
|
| |
| | operator const CharType * () const |
| | Return a pointer to a NULL-terminated character array representing this string. More...
|
| |
| Size | getLength () const |
| | Return the number of character code points that are part of this string, not including the NULL terminator. More...
|
| |
| Size | getLengthInCharacters () const |
| | Return the actual length of this string in characters. More...
|
| |
| Hash | getHashCode () const |
| | Return a hash code for this string. More...
|
| |
| GenericString | toLowerCase () const |
| | Convert this string to lower case. More...
|
| |
| GenericString | toUpperCase () const |
| | Convert this string to lower case. More...
|
| |
|
| static Int | compare (const CharType *string1, const CharType *string2) |
| | Return an integer indicating the lexical order of a C-string when compared to a C-string. More...
|
| |
| static Int | compareIgnoreCase (const CharType *string1, const CharType *string2) |
| | Return an integer indicating the lexical order of a C-string when compared to a C-string, ignoring letter case. More...
|
| |
| static Bool | contains (const CharType *string1, const CharType *string2) |
| | Return whether or not a NULL-terminated string contains another NULL-terminated string as a substring. More...
|
| |
| static Bool | contains (const CharType *string1, const CharType *string2, Size length) |
| | Return whether or not a NULL-terminated string contains another string as a substring. More...
|
| |
| static Bool | containsIgnoreCase (const CharType *string1, const CharType *string2) |
| | Return whether or not a NULL-terminated string contains another NULL-terminated string as a substring if letter case is ignored. More...
|
| |
| static Bool | containsIgnoreCase (const CharType *string1, const CharType *string2, Size length) |
| | Return whether or not a NULL-terminated string contains another string as a substring if letter case is ignored. More...
|
| |
| static Bool | equals (const CharType *string1, const CharType *string2) |
| |
| static Bool | equals (const CharType *string1, const CharType *string2, Size length) |
| |
| static Bool | equalsIgnoreCase (const CharType *string1, const CharType *string2) |
| |
| static Bool | equalsIgnoreCase (const CharType *string1, const CharType *string2, Size length) |
| |
| static Bool | convertToBool (const CharType *stringStart, const CharType *stringEnd, Bool &result) |
| | Convert a string specified by starting and ending pointers to a boolean value. More...
|
| |
| static Bool | convertToInt (const CharType *stringStart, const CharType *stringEnd, Int &result) |
| | Convert a string specified by starting and ending pointers to an integer value. More...
|
| |
| static Bool | convertToInt32 (const CharType *stringStart, const CharType *stringEnd, Int32 &result) |
| | Convert a string specified by starting and ending pointers to an integer value. More...
|
| |
| static Bool | convertToUInt32 (const CharType *stringStart, const CharType *stringEnd, UInt32 &result) |
| | Convert a string specified by starting and ending pointers to an integer value. More...
|
| |
| static Bool | convertToInt64 (const CharType *stringStart, const CharType *stringEnd, Int64 &result) |
| | Convert a string specified by starting and ending pointers to an integer value. More...
|
| |
| static Bool | convertToUInt64 (const CharType *stringStart, const CharType *stringEnd, UInt64 &result) |
| | Convert a string specified by starting and ending pointers to an integer value. More...
|
| |
| static Bool | convertToFloat (const CharType *stringStart, const CharType *stringEnd, Float &result) |
| | Convert a string specified by starting and ending pointers to a float value. More...
|
| |
| static Bool | convertToDouble (const CharType *stringStart, const CharType *stringEnd, Double &result) |
| | Convert a string specified by starting and ending pointers to a float value. More...
|
| |
| template<typename T > |
| static Bool | convertToNumber (const CharType *stringStart, const CharType *stringEnd, T &result) |
| | Convert a string specified by starting and ending pointers to a number value. More...
|
| |
| static Size | getLength (const CharType *characters) |
| | Return the number of code points that are part of the specified NULL-terminated string. More...
|
| |
| static Size | getLengthInCharacters (const CharType *characters) |
| | Return the number of characters that are part of the specified NULL-terminated string. More...
|
| |
| static CharType | toLowerCase (CharType character) |
| |
| static CharType | toUpperCase (CharType character) |
| |
| static Bool | isLetter (CharType character) |
| | Return whether or not the specified character is a letter character. More...
|
| |
| static Bool | isUpperCase (CharType character) |
| | Return whether or not the specified character is an upper-case character. More...
|
| |
| static Bool | isLowerCase (CharType character) |
| | Return whether or not the specified character is a lower-case character. More...
|
| |
| static Bool | isDigit (CharType character) |
| | Return whether or not the specified character is a decimal digit (0 to 9). More...
|
| |
| static Bool | isOctalDigit (CharType character) |
| | Return whether or not the specified character is an octal digit (0 to 7). More...
|
| |
| static Bool | isBinaryDigit (CharType character) |
| | Return whether or not the specified character is an binary digit (0 or 1). More...
|
| |
| static Bool | isHexDigit (CharType character) |
| | Return whether or not the specified character is a hexidecimal digit (0 to 9, A to F). More...
|
| |
| static Bool | isWhitespace (CharType character) |
| | Return whether or not the specified character is a whitespace character (i.e. space, tab, new line, etc). More...
|
| |
| static Bool | isPunctuation (CharType c) |
| | Return whether or not the specified character is a puntuation character (i.e. period, comma, semicolon, etc). More...
|
| |
template<typename CharType>
class om::data::GenericString< CharType >
A string class supporting unicode and ASCII character sets.
The GenericString class is a template class that allows the user to use any of four different specializations: Char for ASCII strings, UTF8Char for UTF-8 strings, UTF16Char for UTF-16 strings, and UTF32Char for UTF-32 strings. In addition to this functionality, it provides comprehensive number-to-string and string-to-number conversion using constructors and cast operators. All strings are immutable after creation. Use the GenericStringBuffer class to efficiently compose strings.
Strings are reference-counted, so the overhead of copying a string object is very small.