CRxString Class
#include "Rx.Core/RxString.h"
class CRxString : public IMemoryAccess
Basic character string operations.
Constructors
CRxString() | Default constructor. |
CRxString(nSize) | Creates an empty string with the given size. |
CRxString(cChar) | Creates a CRxString consisting of character cChar. |
CRxString(pcString) | Creates a CRxString consisting of string pcString. |
CRxString(string, numChars) | Creates a CRxString by copying the given amount of characters from the given memory. |
CRxString(sxString) | Copy constructor. |
CRxString(sxString) | Move constructor. |
CRxString(pSrcMem) | Creates a CRxString consisting of pSrcMem interpreted as character array. |
CRxString(string) | Creates a CRxString based on the given string view. |
Destructor
~CRxString() | Destructor. |
Methods
GetElementSize() | Gets the size in bytes of an element of a string, which is always 1. |
Length() | Gets the length of this CRxString. This is the number of characters. |
GetPointer() | Gets the pointer to memory. |
IsValid() | Query if this object is valid. |
ToCString() | Converts this CRxString to a c string. |
ToInt() | Converts this CRxString to an int. |
ToUInt() | Converts this CRxString to an unsigned int. |
ToUInt64() | Converts this CRxString to a 64-bit unsigned int. |
ToDoubleFromHex() | Converts this hexadecimal string with 16 chars to a 8 byte double variable. |
ToUIntFromHex() | Converts this hexadecimal string to an unsigned value. |
ToUInt64FromHex() | Converts this hexadecimal string to a 64-bit unsigned value. |
ToInt64FromHex() | Converts this hexadecimal string to a 64-bit integer value. |
SubStr(nStartIdx, nCount) | Returns a newly constructed CRxString object with its value initialized to a copy of a substring of this object. |
FindFirstOf(pcWhat, nStartIdx, nCount) | Searches the string for the first character that matches any of the characters specified in its arguments. |
FindFirstNotOf(pcWhat, nStartIdx, nCount) | |
FindLastOf(pcWhat, nStartIdx, nCount) | |
FindLastNotOf(pcWhat, nStartIdx, nCount) | |
Find(string, startIdx, ignoreCase, completeWord) | Searches this string for the content specified in string, and returns the position of the first occurrence in this string. |
Find(string, startIdx, ignoreCase, completeWord) | Searches this string for the content specified in string, and returns the position of the first occurrence in this string. |
Contains(string, ignoreCase, completeWord) | Query if this CRxString contains the given string. |
Contains(pcString, ignoreCase, completeWord) | Query if this CRxString contains the given pcString. |
Contains(sxString, ignoreCase, completeWord) | Query if this CRxString contains the given sxString. |
StartsWith(sxString) | Determines whether the start of this string instance matches the specified string. |
EndsWith(sxString) | Determines whether the end of this string instance matches the specified string. |
Replace(oldStr, newStr, ignoreCase, completeWord) | Replaces all occurrences of oldStr by newStr and returns the resulting string. |
Replace(oldStr, newStr, ignoreCase, completeWord) | Replaces all occurrences of oldStr by newStr and returns the resulting string. |
Assign(pcData, nNumChars) | Assigns a new value to the string, replacing its current contents. |
Data() | Returns a pointer to an array that contains a null-terminated sequence of characters (i.e., a C-string) representing the current value of the string object. |
SplitFilename(sxDirectory, sxName, sxExtension) | Assumes that this CRxString represents a file name and splits it in path, name and extension. |
Static Methods
ToHexString(dVal) | Convert a 8 byte double variable into a hexadecimal string representation with 16 chars. |
Operators
operator=(cChar) | Assignment operator. |
operator=(pcString) | Assignment operator. |
operator=(sxString) | Assignment operator. |
operator=(sxString) | Move assignment operator. |
operator=(pSrcMem) | Assignment operator. |
operator==(pcString) | Equality operator. |
operator==(sxString) | Equality operator. |
operator!=(pcString) | Inequality operator. |
operator!=(sxString) | Inequality operator. |
operator+=(pcString) | Appends the given string to this CRxString. |
operator+=(sxString) | Appends the given string to this CRxString. |
operator+=(iValue) | Appends the given integer to this CRxString. |
operator+=(iValue) | Appends the given integer to this CRxString. |
operator+=(uValue) | Appends the given unsigned integer to this CRxString. |
operator+=(nValue) | Addition assignment operator. |
operator+=(fValue) | Appends the given float to this CRxString. |
operator+=(dValue) | Appends the given double to this CRxString. |
operator<<(pcString) | Appends the given string to this CRxString. |
operator<<(sxString) | Appends the given string to this CRxString. |
operator<<(iValue) | Appends the given __int64 element to the string. |
operator<<(uValue) | Appends the given unsigned integer to this CRxString. |
operator<<(nValue) | Appends the given size_t element to the string. |
operator<<(nValue) | Appends the given size_t element to the string. |
operator<<(fValue) | Appends the given float to this CRxString. |
operator<<(dValue) | Appends the given double to this CRxString. |
operator<<(xPrecision) | Sets the precision of following numbers. |
operator<<(ePresentation) | Sets the number presentation of following numbers. |
operator[](nIndex) | Gets the nIndex-th character from string. |
operator<(sxString) | Less-than comparison operator. |
Static Variables
npos | npos is a static member constant value with the greatest possible value for an element of type size_t. |