ADTF
3.18.2
|
String Class. More...
Public Types | |
typedef string_base< storageT > | _myType |
definition my type | |
typedef storageT | _StorageType |
definition storage type | |
typedef _StorageType::value_type | value_type |
definition of value type | |
typedef _StorageType::iterator | iterator |
short typedefinition for cString iterators | |
typedef _StorageType::const_iterator | const_iterator |
short typedefinition for cString iterators | |
typedef _StorageType::reverse_iterator | reverse_iterator |
short typedefinition for cString reverse iterators | |
typedef _StorageType::const_reverse_iterator | const_reverse_iterator |
short typedefinition for cString reverse iterators | |
Public Member Functions | |
string_base () | |
Constructor that initializes an empty cStringA object. | |
string_base (const _myType &strValue) | |
Constructor that initalizes an existing cString object with the spezified string value. | |
string_base & | operator= (const _myType &strValue) |
The cString assignment (=) operator assigns a new value to the existing cString object. More... | |
string_base (_myType &&strValue) | |
Constructor that initalizes an existing cString object with the spezified string value. | |
string_base & | operator= (_myType &&strValue) |
The cString assignment (=) operator assigns a new value to the existing cString object. More... | |
template<class T2 > | |
string_base (const string_base< T2 > &strValue) | |
Constructor that initalizes an existing cString object with the spezified string value. | |
template<class T2 > | |
string_base & | operator= (const string_base< T2 > &strValue) |
Constructor that initalizes an existing cString object with the spezified string value. | |
string_base (const _StorageType &strValue) | |
Constructor that initalizes an existing cString object with the spezified string value. | |
string_base & | operator= (const _StorageType &strValue) |
The cString assignment (=) operator assigns a new value to the existing cString object. More... | |
string_base (const tChar &strValue) | |
Constructor that initalizes an existing cString object with the spezified string value. | |
string_base & | operator= (const tChar &strValue) |
The cString assignment (=) operator assigns a new value to the existing cString object. More... | |
string_base (const tChar *strValue) | |
Constructor that initalizes an existing cString object with the spezified string value. | |
string_base (const tChar *strValue, tSize szLength) | |
Constructor that initalizes an existing cString object with the spezified string value. More... | |
string_base & | operator= (const tChar *strValue) |
The cString assignment (=) operator assigns a new value to the existing cString object. More... | |
virtual | ~string_base () |
Destructor. | |
iterator | begin () |
Iterator to beginning. | |
iterator | end () |
Iterator to end. | |
reverse_iterator | rbegin () |
Reverse iterator to beginning. | |
reverse_iterator | rend () |
Reverse iterator to end. | |
const_iterator | cbegin () const |
Iterator to beginning. | |
const_iterator | cend () const |
Iterator to end. | |
const_reverse_iterator | crbegin () const |
Reverse iterator to beginning. | |
const_reverse_iterator | crend () const |
Reverse iterator to end. | |
tVoid | Clear () |
Makes this cStringA object an empty string and frees memory as appropriate. | |
_myType & | Set (const _myType &strStringToSet, tSize nLength=InvalidPos) |
Assigns a new value to a cStringA object. More... | |
_myType & | Set (const tChar *pString, tSize nLength=InvalidPos) |
Assigns a new value to a cStringA object. More... | |
_myType & | Set (tChar c, tSize nCount) |
Assigns a new value to a cStringA object. More... | |
tSize | GetLength () const |
This function returns the number of characters in a cStringA object. More... | |
tSize | SetBuffer (tSize szSize) |
Sets or resizes the internal string buffer. More... | |
tSize | GetBufferSize () const |
Get the size of the internal allocated string buffer. More... | |
tChar | GetAt (tSize nIdx) const |
You can think of a cStringA object as an array of characters. More... | |
tVoid | SetAt (tSize nIdx, tChar c) |
The SetAt member function sets a single character at a specified position. More... | |
const tChar & | operator[] (tSize nIdx) const |
array access operator More... | |
tChar & | operator[] (tSize nIdx) |
array access operator More... | |
tBool | IsEmpty () const |
This function checks if the string object is empty. More... | |
tBool | IsNotEmpty () const |
This function checks if the string object is not empty. More... | |
const tChar * | GetPtr () const |
This function returns the current string as an array of characters (c-style) More... | |
tChar * | GetBuffer () |
This function returns the pointer to the data. More... | |
_myType & | Append (const _myType &strString, tSize nLength=InvalidPos) |
This function appends a string to the end of the cStringA object. More... | |
_myType & | Append (tChar c) |
This function appends one character to the end of the cStringA object. More... | |
_myType & | Delete (tSize nPos, tSize nLength=InvalidPos) |
This function deletes a substring of length nLength characters from the cStringA object, starting at position nPos (zero-based). More... | |
_myType & | Insert (const _myType &strToInsertString, tSize nPos, tSize nLength=InvalidPos) |
This function inserts a string into the cStringA object. More... | |
_myType & | Insert (const tChar *pToInsertString, tSize nPos, tSize nLength=InvalidPos) |
This function inserts a string into the cStringA object. More... | |
tInt | Compare (const _myType &strString, tSize nPos=0, tSize nLength=InvalidPos) const |
This function compares a cStringA object with another string using the generic-text function _tcscmp. More... | |
tInt | Compare (const tChar *strString, tSize nPos=0, tSize nLength=InvalidPos) const |
This function compares a cStringA object with another string using the generic-text function _tcscmp. More... | |
tInt | CompareNoCase (const _myType &strString, tSize nPos=0, tSize nLength=InvalidPos) const |
This function compares a cStringA object with another string using the generic-text function _tcsicmp. More... | |
tBool | IsEqual (const _myType &strCmp, tSize nPos=0, tSize nLength=InvalidPos) const |
This function checks if the two strings are equal (case sensitive) More... | |
tBool | IsEqualNoCase (const _myType &strCmp, tSize nPos=0, tSize nLength=InvalidPos) const |
This function checks if the two strings are equal (case insensitive) More... | |
tBool | IsNotEqual (const _myType &strCmp, tSize nPos=0, tSize nLength=InvalidPos) const |
This function checks if the two strings are not equal (case sensitive) More... | |
tBool | IsNotEqualNoCase (const _myType &strCmp, tSize nPos=0, tSize nLength=InvalidPos) const |
This function checks if the two strings are not equal (case insensitive) More... | |
tSize | Find (const _myType &strStringToFind, tSize nStart=0, const tBool bNoCase=tFalse) const |
This function searches the cStringA object for the first match of a substring. More... | |
tSize | Find (tChar cToFind, tSize nStart=0) const |
This function searches the cStringA object for the first match of the specified character. More... | |
tSize | RFind (tChar cChar, tSize nStart=0) const |
This function searches the cStringA object for the last match of the specified character. More... | |
tSize | FindToken (const _myType &strTokenList, tSize nStart=0) const |
This function searches a string for the first character that matches any character contained in a token list. More... | |
tSize | FindNotToken (const _myType &strTokenList, tSize nStart=0) const |
This function searches a string for the first character that matches none of the characters contained in a token list. More... | |
tSize | CountString (const _myType &strFind, tSize nStart=0) const |
This counts the occurrences of a given substring in a string. More... | |
tSize | Replace (const _myType &strOld, const _myType &strNew, tBool bReplaceAll=tTrue) |
This function replaces one substring by another. More... | |
tSize | Replace (tChar cOld, tChar cNew, tBool bReplaceAll=tTrue) |
This function replaces one character by another. More... | |
tSize | Filter (tChar cChar) |
This function removes all occurrences of a given character from a string. More... | |
tSize | Filter (const _myType &strCharList) |
This function removes all occurrences of each character given in a token list. More... | |
tBool | StartsWith (const _myType &strStartsWith, const tBool bNoCase=tFalse) const |
This function checks if the string starts with a given prefix. More... | |
tSize | RSplitByToken (const tChar cToken, _myType &strFirst, _myType &strSecond) const |
tSize | SplitByToken (const tChar cToken, _myType &strFirst, _myType &strSecond) const |
tBool | EndsWith (const _myType &strEndsWith, const tBool bNoCase=tFalse) const |
This function checks if the string ends with a given postfix. More... | |
operator const tChar * () const | |
This useful casting operator provides an efficient method to access the null- terminated C string contained in a cStringA object. More... | |
const _myType & | operator+= (const _myType &strString) |
The += concatenation operator joins characters to the end of this string. More... | |
tBool | operator== (const tChar *pString) const |
Checks if a string equals the cStringA object. More... | |
tBool | operator!= (const tChar *pString) const |
Checks if a string does not equal the cStringA object. More... | |
tBool | operator< (const tChar *pString) const |
Checks if a string is lexicographically greater than the cStringA object. More... | |
tBool | operator> (const tChar *pString) const |
Checks if a string is lexicographically smaller than the cStringA object. More... | |
tBool | operator<= (const tChar *pString) const |
Checks if a string is lexicographically greater than or equal to the cStringA object. More... | |
tBool | operator>= (const tChar *pString) const |
Checks if a string is lexicographically smaller than or equal to the cStringA object. More... | |
tBool | operator== (const _myType &strString) const |
Checks if a string equals the cStringA object. More... | |
tBool | operator!= (const _myType &strString) const |
Checks if a string not equals the cStringA object. More... | |
tBool | operator< (const _myType &strString) const |
Checks if a string is lexicographically greater than the cStringA object. More... | |
tBool | operator> (const _myType &strString) const |
Checks if a string is lexicographically smaller than the cStringA object. More... | |
tBool | operator<= (const _myType &strString) const |
Checks if a string is lexicographically greater than or equal to the cStringA object. More... | |
tBool | operator>= (const _myType &strString) const |
Checks if a string is lexicographically smaller than or equal to the cStringA object. More... | |
_myType | SubString (tSize nPos, tSize nLength=InvalidPos) const |
This function extracts a substring of length nLength characters from the cStringA object, starting at position nPos (zero-based). More... | |
_myType | Mid (tSize nPos, tSize nLength=InvalidPos) const |
This function extracts a substring of length nLength characters from the cStringA object, starting at position nPos (zero-based). More... | |
_myType | Left (tSize nLength) const |
Extracts the first (that is, leftmost) nLength characters from the cStringA object and returns a copy of the extracted substring. More... | |
_myType | Right (tSize nLength) const |
Extracts the last (that is, rightmost) nLength characters from the cStringA object and returns a copy of the extracted substring. More... | |
tVoid | Split (string_list_base< _myType > &lstSplittedResult, tChar cToken) const |
This function splits up a single cStringA object into several parts using a token character. More... | |
tVoid | Split (string_list_base< _myType > &lstSplittedResult, const _myType &strToken) const |
This function splits up a single cStringA object into several parts using a token string. More... | |
tVoid | SplitToken (string_list_base< _myType > &lstList, const _myType &strTokenList) const |
Split string using a token list. More... | |
tVoid | Trim () |
This function removes leading and trailing whitespace characters from a cStringA object. More... | |
tVoid | LeftTrim (tBool bNumTrim=tFalse) |
This function removes leading whitespace characters or leading zero characters from a cStringA object. More... | |
tVoid | RightTrim () |
This function removes trailing whitespace characters from a cStringA object. | |
tVoid | NumTrim () |
This function removes whitespace and redundant zero characters from a cStringA object. More... | |
tVoid | DropQuotes () |
This function removes quotes from a cStringA object. More... | |
tVoid | ToLower () |
This function converts a cStringA object to a lowercase string. More... | |
tVoid | ToUpper () |
This function converts a cStringA object to an uppercase string. More... | |
_myType & | Escape () |
Escape control characters. More... | |
_myType & | Unescape () |
Escape control characters. More... | |
tBool | IsInteger () const |
Check if string content represents an integer value. More... | |
tBool | IsFloat () const |
Check if string content represents a floating point value. More... | |
tBool | IsNumeric () const |
Check if string content represents a numeric value. More... | |
tInt32 | AsInt32 () const |
This function converts the string to an integer value. More... | |
tVoid | ToType (tInt32 &i32Value) const |
This function converts the string to an integer value. More... | |
tUInt32 | AsUInt32 () const |
This function converts the string to an integer value. More... | |
tVoid | ToType (tUInt32 &ui32Value) const |
This function converts the string to an integer value. More... | |
tInt64 | AsInt64 () const |
This function converts the string to an integer value. More... | |
tVoid | ToType (tInt64 &i64Value) const |
This function converts the string to an integer value. More... | |
tUInt64 | AsUInt64 () const |
This function converts the string to an integer value. More... | |
tVoid | ToType (tUInt64 &ui64Value) const |
This function converts the string to an integer value. More... | |
tFloat64 | AsFloat64 () const |
This function converts the string to a floating-point value. More... | |
tVoid | ToType (tFloat64 &f64Value) const |
This function converts the string to a floating-point value. More... | |
tFloat32 | AsFloat32 () const |
This function converts the string to a floating-point value. More... | |
tVoid | ToType (tFloat32 &f32Value) const |
This function converts the string to a floating-point value. More... | |
tBool | AsBool () const |
This function converts the string to a boolean value. More... | |
tVoid | ToType (tBool &bValue) const |
This function converts the string to a boolean value. More... | |
tInt64 | HexToInt64 () const |
This function converts a hexadecimal string representation to an integer value. More... | |
tSize | GetMaxBufferSize () const |
Return maximum size of string buffer. More... | |
tVoid | HexToType (tInt64 &i64Value) const |
This function converts a hexadecimal string representation to an integer value. More... | |
Static Public Member Functions | |
static _myType | Repeat (tChar c, tSize nCount) |
Creates a string from a repeated character. More... | |
static _myType | FromType (tInt32 i32Value, const _myType &strFormat=Empty) |
This function creates a new cString object from a numeric value. More... | |
static _myType | FromType (tUInt32 ui32Value, const _myType &strFormat=Empty) |
This function creates a new cString object from a numeric value. More... | |
static _myType | FromType (tInt64 i64Value, const _myType &strFormat=Empty) |
This function creates a new cString object from a numeric value. More... | |
static _myType | FromType (tUInt64 ui64Value, const _myType &strFormat=Empty) |
This function creates a new cString object from a numeric value. More... | |
static _myType | FromType (tFloat64 f64Value, const _myType &strFormat=Empty) |
This function creates a new cString object from a numeric value. More... | |
static _myType | FromType (tFloat32 f32Value, const _myType &strFormat=Empty) |
This function creates a new cString object from a numeric value. More... | |
static _myType | FromType (tBool bValue, const _myType &strFormat=Empty) |
This function creates a new cString object from a boolean value. More... | |
static _myType | Format (const value_type *strFormat,...) |
Write formatted data to a string. More... | |
template<typename T > | |
static _myType | ToStringFromType (T oValue, const _myType &strFormat) |
This function creates a new cString object from a numeric value. More... | |
static _myType & | Copy (_myType &strDestination, const _myType &strSource, tSize szLength=InvalidPos) |
Copies the value of one StringObject to another Stringobject. More... | |
Static Public Attributes | |
static const _myType | Empty |
Internally used empty string. | |
static const tSize | InvalidPos = g_npos |
used to identicate out of range, invalidpos or default length | |
Private Attributes | |
_StorageType | m_oStorageBuffer |
storage buffer | |
String Class.
Mind that this does not support any multi-byte encodings (UTF-8) but ANSI charsets only.
|
inline |
Constructor that initalizes an existing cString object with the spezified string value.
strValue | [in] Source string. |
szLength | [in] Number of characters to be taken from the source string. |
Definition at line 155 of file string.h.
References string_base< storageT >::Set().
|
inline |
This function appends a string to the end of the cStringA object.
strString | [in] cStringA object to be appended. |
nLength | [in] Number of characters that will be taken from strString for appending |
Definition at line 497 of file string.h.
References string_base< storageT >::GetLength(), string_base< storageT >::InvalidPos, and string_base< storageT >::m_oStorageBuffer.
Referenced by string_base< storageT >::Filter(), string_base< storageT >::Insert(), A_UTILS_NS::operator+(), string_base< storageT >::operator+=(), and string_base< storageT >::Replace().
This function appends one character to the end of the cStringA object.
c | [in] Character to be appended. |
Definition at line 537 of file string.h.
References string_base< storageT >::GetLength(), and string_base< storageT >::m_oStorageBuffer.
|
inline |
This function converts the string to a boolean value.
Only the following strings will be interpreted as true (not case sensitive): "true","on","1", all other strings will be interpreted as false. If a string is concatenate by a true-literal (and vice versa) it is interpreted as false.
Definition at line 2305 of file string.h.
References string_base< storageT >::ToType().
|
inline |
This function converts the string to a floating-point value.
The string has to be in the following format to be interpreted as a float: [whitespace][sign][digits][(.|,)digits][{d|D|e|E}[sign]digits]. If the number is written as a hex-number the string can be converted, too. i.e "0x4fff abc". Both '.' and ',' are interpreted as decimal point.
Definition at line 2259 of file string.h.
References string_base< storageT >::ToType().
|
inline |
This function converts the string to a floating-point value.
The string has to be in the following format to be interpreted as a float: [whitespace][sign][digits][(.|,)digits][{d|D|e|E}[sign]digits]. If the number is written as a hex-number the string can be converted, too. i.e "0x4fff abc". Both '.' and ',' are interpreted as decimal point.
Definition at line 2212 of file string.h.
References string_base< storageT >::ToType().
|
inline |
This function converts the string to an integer value.
The function stops reading at the first character, that is not part of a number. i.e. "123abc" can be converted, but "abc123" not. If the number is written as a hex-number the string can be converted, too. i.e "0x4fff abc". More Information about converting hex-numbers see
Definition at line 2020 of file string.h.
References string_base< storageT >::ToType().
|
inline |
This function converts the string to an integer value.
The function stops reading at the first character, that is not part of a number. i.e. "123abc" can be converted, but "abc123" not. If the number is written as a hex-number the string can be converted, too. i.e "0x4fff abc". More Information about converting hex-numbers see
Definition at line 2115 of file string.h.
References string_base< storageT >::ToType().
Referenced by adtf::remote::ant::parse_logging_rpc_buffer().
|
inline |
This function converts the string to an integer value.
The function stops reading at the first character, that is not part of a number. i.e. "123abc" can be converted, but "abc123" not. If the number is written as a hex-number the string can be converted, too. i.e "0x4fff abc". More Information about converting hex-numbers see
Definition at line 2066 of file string.h.
References string_base< storageT >::ToType().
Referenced by adtf::remote::ant::parse_logging_rpc_buffer().
|
inline |
This function converts the string to an integer value.
The function stops reading at the first character, that is not part of a number. i.e. "123abc" can be converted, but "abc123" not. If the number is written as a hex-number the string can be converted, too. i.e "0x4fff abc". More Information about converting hex-numbers see
Definition at line 2164 of file string.h.
References string_base< storageT >::ToType().
|
inline |
This function compares a cStringA object with another string using the generic-text function _tcscmp.
The generic-text function _tcscmp, which is defined in tChar.H, maps to either strcmp, wcscmp, or _mbscmp depending on the character set that is defined at compile time. Each of these functions performs a case-sensitive comparison of the strings, and is not affected by locale.
[in] | strString | The other string used for comparison. |
[in] | nPos | beginning position to compare |
[in] | nLength | amount of characters to be compared. -1 means until end |
Definition at line 689 of file string.h.
References cStringUtil::Compare(), and string_base< storageT >::GetPtr().
Referenced by string_base< storageT >::IsEqual(), string_base< storageT >::IsNotEqual(), string_base< storageT >::operator!=(), xml_string_compare_func::operator()(), string_base_compare_func< sT, sT2 >::operator()(), string_base< storageT >::operator<(), A_UTILS_NS::operator<(), string_base< storageT >::operator<=(), A_UTILS_NS::operator<=(), string_base< storageT >::operator==(), string_base< storageT >::operator>(), A_UTILS_NS::operator>(), string_base< storageT >::operator>=(), A_UTILS_NS::operator>=(), and string_base< storageT >::StartsWith().
|
inline |
This function compares a cStringA object with another string using the generic-text function _tcscmp.
[in] | strString | The other string used for comparison. |
[in] | nPos | beginning position to compare |
[in] | nLength | amount of characters to be compared. -1 means until end |
Definition at line 710 of file string.h.
References cStringUtil::Compare(), and string_base< storageT >::GetPtr().
|
inline |
This function compares a cStringA object with another string using the generic-text function _tcsicmp.
The generic-text function _tcsicmp, which is defined in tChar.H, maps to either _stricmp, _wcsicmp, _mbsicmp depending on the character set that is defined at compile time. Each of these functions performs a case-insensitive comparison of the strings, and is not affected by locale..
strString | [in] The other string used for comparison. |
nPos | [in] Compare from position nPos. |
nLength | [in] Compare only nLength characters. |
Definition at line 738 of file string.h.
References cStringUtil::CompareNoCase(), and string_base< storageT >::GetPtr().
Referenced by string_base< storageT >::IsNotEqualNoCase(), string_base_no_case_compare_func< sT, sT2 >::operator()(), and string_base< storageT >::StartsWith().
|
inlinestatic |
Copies the value of one StringObject to another Stringobject.
[out] | strDestination | Reference to the string that should store the copied value. |
[in] | strSource | Reference to the source string from which the copy will be made. |
[in] | szLength | Number of characters to be taken from the source string. As default, the complete string is copied. |
Definition at line 2454 of file string.h.
References string_base< storageT >::Set().
This counts the occurrences of a given substring in a string.
strFind | [in] Substring to be searched for. |
nStart | [in] Start position that the search begins with. |
Definition at line 962 of file string.h.
References string_base< storageT >::Find(), string_base< storageT >::GetLength(), string_base< storageT >::InvalidPos, and string_base< storageT >::IsEmpty().
|
inline |
This function deletes a substring of length nLength characters from the cStringA object, starting at position nPos (zero-based).
The function returns a copy of the resulting string.
nPos | [in] The zero-based index of the first character in the cStringA object that is to be deleted. |
nLength | [in] The number of characters to delete from this cStringA object. If this parameter is not supplied, then the remainder of the string is deleted. |
Definition at line 578 of file string.h.
References string_base< storageT >::Clear(), string_base< storageT >::GetLength(), string_base< storageT >::InvalidPos, string_base< storageT >::IsEmpty(), and string_base< storageT >::m_oStorageBuffer.
Referenced by string_base< storageT >::DropQuotes(), string_base< storageT >::LeftTrim(), string_base< storageT >::NumTrim(), and string_base< storageT >::RightTrim().
|
inline |
This function removes quotes from a cStringA object.
Quotes are '"' and '\''
Definition at line 1719 of file string.h.
References string_base< storageT >::begin(), string_base< storageT >::Delete(), string_base< storageT >::GetLength(), string_base< storageT >::IsEmpty(), and string_base< storageT >::rbegin().
This function checks if the string ends with a given postfix.
strEndsWith | [in] The postfix to check for. |
bNoCase | [in] Whether or not to check case insensitive or not. |
Definition at line 1176 of file string.h.
References string_base< storageT >::GetLength(), string_base< storageT >::IsEqual(), string_base< storageT >::IsEqualNoCase(), string_base< storageT >::Right(), and tFalse.
Referenced by string_base< storageT >::Split().
|
inline |
Escape control characters.
Definition at line 1787 of file string.h.
References string_base< storageT >::begin(), string_base< storageT >::GetBufferSize(), string_base< storageT >::GetLength(), string_base< storageT >::GetPtr(), string_base< storageT >::IsEmpty(), string_base< storageT >::Set(), string_base< storageT >::SetBuffer(), tFalse, and tTrue.
This function removes all occurrences of each character given in a token list.
strCharList | [in] List of characters to be removed from the string. |
Definition at line 1097 of file string.h.
References string_base< storageT >::Append(), string_base< storageT >::Find(), string_base< storageT >::GetAt(), string_base< storageT >::GetLength(), string_base< storageT >::InvalidPos, string_base< storageT >::IsEmpty(), string_base< storageT >::m_oStorageBuffer, and string_base< storageT >::SetBuffer().
|
inline |
This function searches the cStringA object for the first match of a substring.
strStringToFind | [in] A substring to search for. |
nStart | [in] The index of the character in the string to begin the search with, or 0 to start from the beginning. |
bNoCase | [in] Compare case sensitive if flag is tFalse |
Definition at line 831 of file string.h.
References string_base< storageT >::Find(), string_base< storageT >::m_oStorageBuffer, and string_base< storageT >::ToLower().
Referenced by string_base< storageT >::CountString(), string_base< storageT >::Filter(), string_base< storageT >::Find(), string_base< storageT >::Replace(), and string_base< storageT >::Split().
This function searches the cStringA object for the first match of the specified character.
cToFind | [in] A single character to search for. |
nStart | [in] The index of the character in the string to begin the search with, or 0 to start from the beginning. |
Definition at line 863 of file string.h.
References string_base< storageT >::Find(), and tFalse.
This function searches a string for the first character that matches none of the characters contained in a token list.
strTokenList | [in] String containing characters for matching. |
nStart | [in] The index of the character in the string to begin the search with, or 0 to start from the beginning. |
Definition at line 937 of file string.h.
References string_base< storageT >::InvalidPos, string_base< storageT >::IsEmpty(), and string_base< storageT >::m_oStorageBuffer.
This function searches a string for the first character that matches any character contained in a token list.
strTokenList | [in] String containing characters for matching. |
nStart | [in] The index of the character in the string to begin the search with, or 0 to start from the beginning. |
Definition at line 908 of file string.h.
References string_base< storageT >::InvalidPos, string_base< storageT >::IsEmpty(), and string_base< storageT >::m_oStorageBuffer.
Referenced by string_base< storageT >::NumTrim(), and string_base< storageT >::SplitToken().
|
inlinestatic |
Write formatted data to a string.
The Format method formats and stores a series of characters and values in a new cString buffer object. Each argument (if any) is converted and output according to the corresponding format specification in format. The format consists of ordinary characters and has the same form and function as the format argument for printf. If copying occurs between strings that overlap, the behavior is undefined.
For 64-Bit-Integer conversion use lld (Win32, Linux) or I64d (only Win32). lld maps to a long long integer whereas I64d maps to an integer with 64-bit size. The first one may not be typesafe but is portable between Windows and Linux.
[in] | strFormat | Format control string. |
[in] | args | Variable argument list. |
Definition at line 2399 of file string.h.
References string_base< storageT >::GetBuffer(), string_base< storageT >::GetBufferSize(), and string_base< storageT >::SetBuffer().
This function creates a new cString object from a boolean value.
The numeric data is converted to an unformatted string.
[in] | bValue | Numeric value. |
[in] | strFormat | Format definition (see Format). |
Definition at line 2336 of file string.h.
References string_base< storageT >::ToStringFromType().
This function creates a new cString object from a numeric value.
The numeric data is converted to an unformatted string.
[in] | f32Value | Numeric value. |
[in] | strFormat | Format definition (see Format). |
Definition at line 2290 of file string.h.
References string_base< storageT >::ToStringFromType().
This function creates a new cString object from a numeric value.
The numeric data is converted to an unformatted string.
[in] | f64Value | Numeric value. |
[in] | strFormat | Format definition (see Format). |
Definition at line 2243 of file string.h.
References string_base< storageT >::ToStringFromType().
This function creates a new cString object from a numeric value.
[in] | i32Value | Numeric value. |
[in] | strFormat | Format definition (see Format). |
Definition at line 2050 of file string.h.
References string_base< storageT >::ToStringFromType().
This function creates a new cString object from a numeric value.
The numeric data is converted to an unformatted string.
[in] | i64Value | Numeric value. |
[in] | strFormat | Format definition (see Format). |
Definition at line 2148 of file string.h.
References string_base< storageT >::ToStringFromType().
This function creates a new cString object from a numeric value.
[in] | ui32Value | Numeric value. |
[in] | strFormat | Format definition (see Format). |
Definition at line 2097 of file string.h.
References string_base< storageT >::ToStringFromType().
This function creates a new cString object from a numeric value.
The numeric data is converted to an unformatted string.
[in] | ui64Value | Numeric value. |
[in] | strFormat | Format definition (see Format). |
Definition at line 2196 of file string.h.
References string_base< storageT >::ToStringFromType().
You can think of a cStringA object as an array of characters.
The GetAt member function returns a single character specified by an index number.
nIdx | [in] Zero-based index of the character in the cStringA object. The nIndex parameter must be greater than or equal to 0 and less than the value returned by GetLength. |
Definition at line 377 of file string.h.
References string_base< storageT >::GetLength(), and string_base< storageT >::m_oStorageBuffer.
Referenced by string_base< storageT >::Filter(), and string_base< storageT >::NumTrim().
|
inline |
This function returns the pointer to the data.
Definition at line 480 of file string.h.
References string_base< storageT >::m_oStorageBuffer.
Referenced by string_base< storageT >::Format(), and string_base< storageT >::ToStringFromType().
|
inline |
Get the size of the internal allocated string buffer.
The returned size also includes the null-terminating byte ('\0').
Definition at line 356 of file string.h.
References string_base< storageT >::m_oStorageBuffer.
Referenced by string_base< storageT >::Escape(), string_base< storageT >::Format(), string_base< storageT >::SetBuffer(), and string_base< storageT >::ToStringFromType().
|
inline |
This function returns the number of characters in a cStringA object.
Definition at line 309 of file string.h.
References cStringUtil::GetLength(), and string_base< storageT >::GetPtr().
Referenced by string_base< storageT >::Append(), string_base< storageT >::CountString(), string_base< storageT >::Delete(), string_base< storageT >::DropQuotes(), string_base< storageT >::EndsWith(), string_base< storageT >::Escape(), string_base< storageT >::Filter(), string_base< storageT >::GetAt(), string_base< storageT >::Insert(), string_base< storageT >::Mid(), string_base< storageT >::NumTrim(), string_base< storageT >::Replace(), string_base< storageT >::RFind(), string_base< storageT >::Right(), string_base< storageT >::RightTrim(), string_base< storageT >::SetAt(), string_base< storageT >::Split(), string_base< storageT >::StartsWith(), string_base< storageT >::SubString(), and string_base< storageT >::Unescape().
|
inline |
Return maximum size of string buffer.
Definition at line 2360 of file string.h.
References string_base< storageT >::m_oStorageBuffer.
Referenced by string_base< storageT >::ToStringFromType().
|
inline |
This function returns the current string as an array of characters (c-style)
Definition at line 467 of file string.h.
References string_base< storageT >::m_oStorageBuffer.
Referenced by string_base< storageT >::string_base(), string_base< storageT >::Compare(), string_base< storageT >::CompareNoCase(), adtf::ucom::kiwi::current_exception_to_string(), string_base< storageT >::Escape(), adtf_ddl::access_element::find_index(), string_base< storageT >::GetLength(), string_base< storageT >::HexToType(), string_base< storageT >::IsEmpty(), string_base< storageT >::IsEqualNoCase(), string_base< storageT >::IsFloat(), string_base< storageT >::IsInteger(), string_base< storageT >::operator const tChar *(), string_base< storageT >::operator!=(), string_base< storageT >::operator<(), string_base< storageT >::operator<=(), string_base< storageT >::operator=(), string_base< storageT >::operator==(), string_base< storageT >::operator>(), string_base< storageT >::operator>=(), string_base< storageT >::ToStringFromType(), string_base< storageT >::ToType(), and string_base< storageT >::Unescape().
|
inline |
This function converts a hexadecimal string representation to an integer value.
A valid hex number has the following representation [+-]? 0? x? {[0-9a-fA-F]*
Definition at line 2348 of file string.h.
References string_base< storageT >::HexToType().
This function converts a hexadecimal string representation to an integer value.
A valid hex number has the following representation [+-]? 0? x? {[0-9a-fA-F]*
[out] | i64Value | Reference to the integer variable that should store the converted value. |
Definition at line 2375 of file string.h.
References string_base< storageT >::GetPtr(), and cStringUtil::HexToType().
Referenced by string_base< storageT >::HexToInt64().
|
inline |
This function inserts a string into the cStringA object.
If the nPos is greater than the length of the string or less than 0, strString will NOT be appended. A nLength of <= -1 inserts the complete string.
strToInsertString | [in] The string to insert. |
nPos | [in] The zero-based index of the position where to insert the string. If nPos is greater than the length of the String, the strString will not be appended! |
nLength | [in] The amount of characters of the string that should be inserted. |
Definition at line 634 of file string.h.
References string_base< storageT >::Append(), string_base< storageT >::GetLength(), string_base< storageT >::InvalidPos, and string_base< storageT >::m_oStorageBuffer.
Referenced by string_base< storageT >::Insert().
|
inline |
This function inserts a string into the cStringA object.
If the nPos is greater than the length of the string or less than 0, pString will NOT be appended. A nLength of <= -1 inserts the complete string.
pToInsertString | [in] Pointer to the string to insert. |
nPos | [in] The zero-based index of the position where to insert the string. If nPos is greater than the length of the String, the strString will not be appended ! |
nLength | [in] The amount of characters of the string that should be inserted. |
Definition at line 660 of file string.h.
References string_base< storageT >::Insert().
|
inline |
This function checks if the string object is empty.
Definition at line 441 of file string.h.
References cStringUtil::GetLength(), and string_base< storageT >::GetPtr().
Referenced by string_base< storageT >::CountString(), string_base< storageT >::Delete(), string_base< storageT >::DropQuotes(), string_base< storageT >::Escape(), string_base< storageT >::Filter(), adtf_ddl::access_element::detail::find_complex_index(), string_base< storageT >::FindNotToken(), string_base< storageT >::FindToken(), string_base< storageT >::IsNotEmpty(), string_base< storageT >::Mid(), string_base< storageT >::NumTrim(), string_base< storageT >::Replace(), string_base< storageT >::Split(), string_base< storageT >::StartsWith(), string_base< storageT >::ToLower(), string_base< storageT >::ToUpper(), and string_base< storageT >::Unescape().
|
inline |
This function checks if the two strings are equal (case sensitive)
strCmp | [in] The other string used for comparison. |
nPos | [in] The start index of the strCmp/str1 to compare from. |
nLength | [in] The amount of characters that should be compared. |
Definition at line 755 of file string.h.
References string_base< storageT >::Compare(), tFalse, and tTrue.
Referenced by string_base< storageT >::EndsWith(), cDDLCompareFunctor< T >::operator()(), and A_UTILS_NS::operator==().
|
inline |
This function checks if the two strings are equal (case insensitive)
strCmp | [in] The other string used for comparison. |
nPos | [in] The start index of the strCmp/str1 to compare from . |
nLength | [in] The amount of characters that should be compared. |
Definition at line 773 of file string.h.
References cStringUtil::CompareNoCase(), string_base< storageT >::GetPtr(), tFalse, and tTrue.
Referenced by string_base< storageT >::EndsWith().
|
inline |
Check if string content represents a floating point value.
Allowed float format [whitespace] [sign] [digits] [.digits] [ {d | D | e | E }[sign]digits] sign is either plus (+) or minus (-) digits (0123456789) The decimal digits may be followed by an exponent, which consists of an introductory letter (d, D, e, or E) and an optionally signed decimal integer.
Definition at line 1974 of file string.h.
References string_base< storageT >::GetPtr(), and cStringUtil::IsFloat().
Referenced by string_base< storageT >::IsNumeric().
|
inline |
Check if string content represents an integer value.
A hex number will not be identified as an integer value.
Definition at line 1957 of file string.h.
References string_base< storageT >::GetPtr(), and cStringUtil::IsInteger().
Referenced by string_base< storageT >::IsNumeric().
|
inline |
This function checks if the string object is not empty.
Definition at line 454 of file string.h.
References string_base< storageT >::IsEmpty().
Referenced by string_base< storageT >::SplitToken().
|
inline |
This function checks if the two strings are not equal (case sensitive)
strCmp | [in] The other string used for comparison. |
nPos | [in] The start index to compare from. |
nLength | [in] The amount of characters that should be compared. |
Definition at line 790 of file string.h.
References string_base< storageT >::Compare(), tFalse, and tTrue.
Referenced by A_UTILS_NS::operator!=().
|
inline |
This function checks if the two strings are not equal (case insensitive)
strCmp | [in] The other string used for comparison. |
nPos | [in] The start index to compare from. |
nLength | [in] The amount of characters that should be compared. |
Definition at line 808 of file string.h.
References string_base< storageT >::CompareNoCase(), tFalse, and tTrue.
|
inline |
Check if string content represents a numeric value.
See also
Definition at line 1988 of file string.h.
References string_base< storageT >::IsFloat(), and string_base< storageT >::IsInteger().
Extracts the first (that is, leftmost) nLength characters from the cStringA object and returns a copy of the extracted substring.
If nLength exceeds the string length, then the entire string is extracted. If the nLength is less than zero, an empty string will bee returned. Left is similar to the Basic LEFT$ function (except that indexes are zero-based).
nLength | [in] The number of characters to extract from this cStringA object. |
Definition at line 1448 of file string.h.
References string_base< storageT >::SubString().
This function removes leading whitespace characters or leading zero characters from a cStringA object.
It does not remove a '0' directly left to a comma or decimal point. " abc" -> "abc", "000045" -> "45", "000.45" -> "0.45"
bNumTrim | [in] Whether or not to trim leading '0' |
Definition at line 1622 of file string.h.
References string_base< storageT >::begin(), string_base< storageT >::Delete(), string_base< storageT >::end(), cStringUtil::IsOneOf(), cStringUtil::IsWhiteChar(), tFalse, and tTrue.
Referenced by string_base< storageT >::NumTrim(), and string_base< storageT >::Trim().
|
inline |
This function extracts a substring of length nLength characters from the cStringA object, starting at position nPos (zero-based).
The function returns a copy of the extracted substring. Mid is similar to the Basic MID$ function (except that indexes are zero-based).
nPos | [in] The zero-based index of the first character in the cStringA object that is to be included in the extracted substring. |
nLength | [in] The number of characters to extract from this cStringA object. If this parameter is not supplied, then the remainder of the string is extracted. |
Definition at line 1415 of file string.h.
References string_base< storageT >::Empty, string_base< storageT >::GetLength(), string_base< storageT >::InvalidPos, string_base< storageT >::IsEmpty(), and string_base< storageT >::SubString().
Referenced by string_base< storageT >::Replace(), string_base< storageT >::Split(), and string_base< storageT >::SplitToken().
|
inline |
This function removes whitespace and redundant zero characters from a cStringA object.
The object will be trimmed on the right and on the left side.
Definition at line 1670 of file string.h.
References string_base< storageT >::Delete(), string_base< storageT >::FindToken(), string_base< storageT >::GetAt(), string_base< storageT >::GetLength(), string_base< storageT >::InvalidPos, string_base< storageT >::IsEmpty(), cStringUtil::IsOneOf(), string_base< storageT >::LeftTrim(), string_base< storageT >::RightTrim(), tFalse, and tTrue.
|
inline |
This useful casting operator provides an efficient method to access the null- terminated C string contained in a cStringA object.
No characters are copied; only a pointer is returned. Be careful with this operator. If you change a cStringA object after you have obtained the character pointer, you may cause a reallocation of memory that invalidates the pointer.
Definition at line 1208 of file string.h.
References string_base< storageT >::GetPtr().
Checks if a string not equals the cStringA object.
[in] | strString | The string. |
Definition at line 1320 of file string.h.
References string_base< storageT >::Compare().
Checks if a string does not equal the cStringA object.
pString | The string. |
Definition at line 1251 of file string.h.
References cStringUtil::Compare(), and string_base< storageT >::GetPtr().
The += concatenation operator joins characters to the end of this string.
You should be aware that out-of-memory errors may occur whenever you use this concatenation operator because new storage may be allocated for characters added to this cStringA object.
strString | [in] second cStringA object to be concatenated. |
Definition at line 1228 of file string.h.
References string_base< storageT >::Append().
Checks if a string is lexicographically greater than the cStringA object.
[in] | strString | The string. |
Definition at line 1331 of file string.h.
References string_base< storageT >::Compare().
Checks if a string is lexicographically greater than the cStringA object.
[in] | pString | The string. |
Definition at line 1262 of file string.h.
References cStringUtil::Compare(), and string_base< storageT >::GetPtr().
Checks if a string is lexicographically greater than or equal to the cStringA object.
[in] | strString | The string. |
Definition at line 1354 of file string.h.
References string_base< storageT >::Compare().
Checks if a string is lexicographically greater than or equal to the cStringA object.
[in] | pString | The string. |
Definition at line 1285 of file string.h.
References cStringUtil::Compare(), and string_base< storageT >::GetPtr().
|
inline |
The cString assignment (=) operator assigns a new value to the existing cString object.
strValue | [in] string value to be assigned. |
Definition at line 104 of file string.h.
References string_base< storageT >::Set().
|
inline |
The cString assignment (=) operator assigns a new value to the existing cString object.
strValue | [in] string value to be assigned. |
Definition at line 89 of file string.h.
References string_base< storageT >::Set().
|
inline |
The cString assignment (=) operator assigns a new value to the existing cString object.
strValue | [in] string value to be assigned. |
Definition at line 128 of file string.h.
References string_base< storageT >::m_oStorageBuffer.
|
inline |
The cString assignment (=) operator assigns a new value to the existing cString object.
strValue | [in] string value to be assigned. |
Definition at line 139 of file string.h.
References string_base< storageT >::Set().
|
inline |
The cString assignment (=) operator assigns a new value to the existing cString object.
strValue | [in] string value to be assigned. |
Definition at line 160 of file string.h.
References string_base< storageT >::Set().
Checks if a string equals the cStringA object.
[in] | strString | The string. |
Definition at line 1309 of file string.h.
References string_base< storageT >::Compare().
Checks if a string equals the cStringA object.
[in] | pString | The string. |
Definition at line 1240 of file string.h.
References cStringUtil::Compare(), and string_base< storageT >::GetPtr().
Checks if a string is lexicographically smaller than the cStringA object.
[in] | strString | The string. |
Definition at line 1342 of file string.h.
References string_base< storageT >::Compare().
Checks if a string is lexicographically smaller than the cStringA object.
[in] | pString | The string. |
Definition at line 1273 of file string.h.
References cStringUtil::Compare(), and string_base< storageT >::GetPtr().
Checks if a string is lexicographically smaller than or equal to the cStringA object.
[in] | strString | The string. |
Definition at line 1366 of file string.h.
References string_base< storageT >::Compare().
Checks if a string is lexicographically smaller than or equal to the cStringA object.
[in] | pString | The string. |
Definition at line 1297 of file string.h.
References cStringUtil::Compare(), and string_base< storageT >::GetPtr().
array access operator
nIdx | [in] Zero-based index of the character in the cStringA object. The nIndex parameter must be greater than or equal to 0 and less than the value returned by GetLength. |
Definition at line 426 of file string.h.
References string_base< storageT >::m_oStorageBuffer.
array access operator
nIdx | [in] Zero-based index of the character in the cStringA object. The nIndex parameter must be greater than or equal to 0 and less than the value returned by GetLength. |
Definition at line 414 of file string.h.
References string_base< storageT >::m_oStorageBuffer.
This function replaces one substring by another.
strOld | [in] The character to be replaced by cNew. |
strNew | [in] The character replacing chOld. |
bReplaceAll | [in] If true, all instances are replaced, otherwise just the first instance is replaced. |
Definition at line 995 of file string.h.
References string_base< storageT >::Append(), string_base< storageT >::Find(), string_base< storageT >::GetLength(), string_base< storageT >::InvalidPos, string_base< storageT >::IsEmpty(), string_base< storageT >::m_oStorageBuffer, and string_base< storageT >::Mid().
This function replaces one character by another.
cOld | [in] The character to be replaced by cNew. |
cNew | [in] The character replacing chOld. |
bReplaceAll | [in] If true, all instances are replaced, otherwise just the first instance is replaced. |
Definition at line 1047 of file string.h.
References string_base< storageT >::begin(), string_base< storageT >::end(), and string_base< storageT >::IsEmpty().
This function searches the cStringA object for the last match of the specified character.
cChar | [in] A single character to search for. |
nStart | [in] The index of the character in the string to begin the search with, or 0 to start from the end. |
Definition at line 884 of file string.h.
References string_base< storageT >::GetLength(), and string_base< storageT >::m_oStorageBuffer.
Extracts the last (that is, rightmost) nLength characters from the cStringA object and returns a copy of the extracted substring.
If nLength exceeds the string length, then the entire string is extracted. If nLength is less than zero, an emtpy string will be returned. Right is similar to the Basic RIGHT$ function (except that indexes are zero-based).
nLength | [in] The number of characters to extract from this cStringA object. |
Definition at line 1468 of file string.h.
References string_base< storageT >::GetLength(), and string_base< storageT >::SubString().
Referenced by string_base< storageT >::EndsWith().
|
inline |
Assigns a new value to a cStringA object.
strStringToSet | [in] String value to be assigned. |
nLength | [in] Number of characters to be taken from the source string. As default, the complete string is copied. |
Definition at line 240 of file string.h.
References string_base< storageT >::InvalidPos, and string_base< storageT >::m_oStorageBuffer.
Referenced by string_base< storageT >::string_base(), string_base< storageT >::Copy(), cStringPiece::CopyToString(), string_base< storageT >::Escape(), string_base< storageT >::operator=(), and string_base< storageT >::Unescape().
|
inline |
Assigns a new value to a cStringA object.
pString | [in] Null-terminated string value to be assigned. |
nLength | [in] Number of characters to be taken from the source string. As default, the complete string is copied. |
Definition at line 263 of file string.h.
References string_base< storageT >::InvalidPos, and string_base< storageT >::m_oStorageBuffer.
Assigns a new value to a cStringA object.
c | [in] Character value to be assigned. |
nCount | [in] Repeat count of the character to be assigned. |
Definition at line 289 of file string.h.
References string_base< storageT >::InvalidPos, and string_base< storageT >::m_oStorageBuffer.
The SetAt member function sets a single character at a specified position.
nIdx | [in] Zero-based index of the character in the cStringA object. The nIndex parameter must be greater than or equal to 0 and less than the value returned by GetLength. |
c | [in] Character to be set at the specified position. |
Definition at line 398 of file string.h.
References string_base< storageT >::GetLength(), and string_base< storageT >::m_oStorageBuffer.
Sets or resizes the internal string buffer.
Contents are preserved as long as resized buffer is large enough to hold the data. If the buffer size is reduced the content is cut off at the block border.
szSize | [in] Number of characters to allocate memory for. |
InvalidPos
. Definition at line 328 of file string.h.
References string_base< storageT >::GetBufferSize(), string_base< storageT >::InvalidPos, and string_base< storageT >::m_oStorageBuffer.
Referenced by string_base< storageT >::Escape(), string_base< storageT >::Filter(), string_base< storageT >::Format(), string_base< storageT >::ToStringFromType(), and string_base< storageT >::Unescape().
|
inline |
This function splits up a single cStringA object into several parts using a token string.
Use this function to do simple parsing of joined string arrays.
lstSplittedResult | [in,out] Reference to cStringAList object that should be filled. The list is cleaned first. |
strToken | [in] Token string to be handled as separator key. |
Definition at line 1512 of file string.h.
References string_list_base< storageT >::Append(), string_list_base< storageT >::Clear(), string_base< storageT >::EndsWith(), string_base< storageT >::Find(), string_base< storageT >::GetLength(), string_base< storageT >::InvalidPos, string_base< storageT >::IsEmpty(), and string_base< storageT >::Mid().
|
inline |
This function splits up a single cStringA object into several parts using a token character.
Use this function to do simple parsing of joined string arrays.
lstSplittedResult | [in,out] Reference to cStringAList object that should be filled. The list is cleaned first. |
cToken | [in] Token to be handled as separator character. |
|
inline |
Split string using a token list.
This function splits up a single cStringA object into several parts using a token list. If multiple token are directly appended, no empty entries are added to List i.e. Token '>' and '<' and a string like "foo<>bar" will create a List with "foo" and "bar"
lstList | [in,out] Reference to cStringAList object that should be filled. The list is cleaned first. |
strTokenList | [in] Token list to be used as separator characters. |
Definition at line 1569 of file string.h.
References string_list_base< storageT >::Append(), string_list_base< storageT >::Clear(), string_base< storageT >::FindToken(), string_base< storageT >::InvalidPos, string_base< storageT >::IsNotEmpty(), and string_base< storageT >::Mid().
This function checks if the string starts with a given prefix.
strStartsWith | [in] The prefix to check for. |
bNoCase | [in] Whether or not to check case insensitive or not. |
Definition at line 1131 of file string.h.
References string_base< storageT >::Compare(), string_base< storageT >::CompareNoCase(), string_base< storageT >::GetLength(), string_base< storageT >::IsEmpty(), and tFalse.
|
inline |
This function extracts a substring of length nLength characters from the cStringA object, starting at position nPos (zero-based).
The function returns a copy of the extracted substring.
nPos | [in] The zero-based index of the first character in the cStringA object that is to be included in the extracted substring. |
nLength | [in] The number of characters to extract from this cStringA object. If this parameter is not supplied, then the remainder of the string is extracted. |
Definition at line 1387 of file string.h.
References string_base< storageT >::Empty, string_base< storageT >::GetLength(), and string_base< storageT >::m_oStorageBuffer.
Referenced by string_base< storageT >::Left(), string_base< storageT >::Mid(), and string_base< storageT >::Right().
|
inline |
This function converts a cStringA object to a lowercase string.
Definition at line 1745 of file string.h.
References string_base< storageT >::begin(), string_base< storageT >::end(), and string_base< storageT >::IsEmpty().
Referenced by string_base< storageT >::Find().
This function creates a new cString object from a numeric value.
The numeric data is converted to an unformatted string.
[in] | oValue | Numeric value. |
[in] | strFormat | Format definition (see Format). |
Definition at line 2430 of file string.h.
References cStringUtil::FromType(), string_base< storageT >::GetBuffer(), string_base< storageT >::GetBufferSize(), string_base< storageT >::GetMaxBufferSize(), string_base< storageT >::GetPtr(), and string_base< storageT >::SetBuffer().
Referenced by string_base< storageT >::FromType().
This function converts the string to a boolean value.
Only the following strings will be interpreted as true (not case sensitive): "true","on","1", all other strings will be interpreted as false. If a string is concatenate by a true-literal (and vice versa) it is interpreted as false.
[out] | bValue | Reference to boolean variable where the converted string should be stored. |
Definition at line 2322 of file string.h.
References string_base< storageT >::GetPtr(), and cStringUtil::ToType().
This function converts the string to a floating-point value.
The string has to be in the following format to be interpreted as a float: [whitespace][sign][digits][(.|,)digits][{d|D|e|E}[sign]digits]. If the number is written as a hex-number the string can be converted, too. i.e "0x4fff abc". Both '.' and ',' are interpreted as decimal point.
[out] | f32Value | Reference to floating-point variable where the converted string should be stored. |
Definition at line 2276 of file string.h.
References string_base< storageT >::GetPtr(), and cStringUtil::ToType().
This function converts the string to a floating-point value.
The string has to be in the following format to be interpreted as a float: [whitespace][sign][digits][(.|,)digits][{d|D|e|E}[sign]digits]. If the number is written as a hex-number the string can be converted, too. i.e "0x4fff abc". Both '.' and ',' are interpreted as decimal point.
[out] | f64Value | Reference to floating-point variable where the converted string should be stored. |
Definition at line 2229 of file string.h.
References string_base< storageT >::GetPtr(), and cStringUtil::ToType().
This function converts the string to an integer value.
The function stops reading at the first character, that is not part of a number. i.e. "123abc" can be converted, but "abc123" not. If the number is written as a hex-number the string can be converted, too. i.e "0x4fff abc". More Information about converting hex-numbers see
[out] | i32Value | Reference to integer variable where the converted string should be stored. |
Definition at line 2037 of file string.h.
References string_base< storageT >::GetPtr(), and cStringUtil::ToType().
Referenced by string_base< storageT >::AsBool(), string_base< storageT >::AsFloat32(), string_base< storageT >::AsFloat64(), string_base< storageT >::AsInt32(), string_base< storageT >::AsInt64(), string_base< storageT >::AsUInt32(), and string_base< storageT >::AsUInt64().
This function converts the string to an integer value.
The function stops reading at the first character, that is not part of a number. i.e. "123abc" can be converted, but "abc123" not. If the number is written as a hex-number the string can be converted, too. i.e "0x4fff abc". More Information about converting hex-numbers see
[out] | i64Value | Reference to integer variable where the converted string should be stored. |
Definition at line 2134 of file string.h.
References string_base< storageT >::GetPtr(), and cStringUtil::ToType().
This function converts the string to an integer value.
The function stops reading at the first character, that is not part of a number. i.e. "123abc" can be converted, but "abc123" not. If the number is written as a hex-number the string can be converted, too. i.e "0x4fff abc". More Information about converting hex-numbers see
[out] | ui32Value | Reference to unsigned integer variable where the converted string should be stored. |
Definition at line 2084 of file string.h.
References string_base< storageT >::GetPtr(), and cStringUtil::ToType().
This function converts the string to an integer value.
The function stops reading at the first character, that is not part of a number. i.e. "123abc" can be converted, but "abc123" not. If the number is written as a hex-number the string can be converted, too. i.e "0x4fff abc". More Information about converting hex-numbers see
[out] | ui64Value | Reference to integer variable where the converted string should be stored. |
Definition at line 2182 of file string.h.
References string_base< storageT >::GetPtr(), and cStringUtil::ToType().
|
inline |
This function converts a cStringA object to an uppercase string.
Definition at line 1767 of file string.h.
References string_base< storageT >::begin(), string_base< storageT >::end(), and string_base< storageT >::IsEmpty().
|
inline |
This function removes leading and trailing whitespace characters from a cStringA object.
Definition at line 1607 of file string.h.
References string_base< storageT >::LeftTrim(), and string_base< storageT >::RightTrim().
|
inline |
Escape control characters.
Definition at line 1872 of file string.h.
References string_base< storageT >::begin(), string_base< storageT >::GetLength(), string_base< storageT >::GetPtr(), string_base< storageT >::IsEmpty(), string_base< storageT >::Set(), and string_base< storageT >::SetBuffer().
Referenced by adtf::remote::ant::parse_logging_rpc_buffer().