7 #ifndef _STRINGUTIL_CLASS_HEADER_
8 #define _STRINGUTIL_CLASS_HEADER_
75 tSize nLength = InvalidPos);
118 tSize nLength = InvalidPos);
150 tSize nLength = InvalidPos);
182 tSize nLength = InvalidPos);
369 tChar* strBufferResult,
370 tSize szBufferResult,
371 const tChar* strFormat =
"");
385 tChar* strBufferResult,
386 tSize szBufferResult,
387 const tChar* strFormat =
"");
400 tChar* strBufferResult,
401 tSize szBufferResult,
402 const tChar* strFormat =
"");
415 tChar* strBufferResult,
416 tSize szBufferResult,
417 const tChar* strFormat =
"");
430 tChar* strBufferResult,
431 tSize szBufferResult,
432 const tChar* strFormat);
445 tChar* strBufferResult,
446 tSize szBufferResult,
447 const tChar* strFormat);
460 tChar* strBufferResult,
461 tSize szBufferResult,
462 const tChar* strFormat);
489 _Out_writes_z_(szBufferResult)
491 tChar* strBufferResult,
492 tSize szBufferResult,
494 _In_z_ _Printf_format_string_
496 const tChar* strFormat,
499 __attribute__((
format(printf, 3, 4)))
674 const tChar* pstrSource,
675 tSize nCount = InvalidPos,
676 tSize nDestinationBufferSize = InvalidPos);
731 const tBool bNumeric);
char tChar
The tChar defines the type for platform character set (platform and compiler dependent type).
int64_t tInt64
type definition for signed integer values (64bit) (platform and compiler independent type).
int32_t tInt32
type definition for signed integer values (32bit) (platform and compiler independent type).
float tFloat32
type definition for Float32 (32bit float values) (platform and compiler independent type).
void tVoid
The tVoid is always the definition for the void (non-type).
int tInt
type definition for signed integer value (platform and compiler dependent type).
double tFloat64
type definition for Float64 (64bit double values) (platform and compiler independent type).
bool tBool
The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent).
uint32_t tUInt32
type definition for unsigned integer values (32bit) (platform and compiler independent type).
size_t tSize
type definition for a array size values, map size values etc.
uint64_t tUInt64
type definition for unsigned integer values (64bit) (platform and compiler independent type).
A common result class usable as return value throughout.
static const tChar * FromType(tBool bValue, tChar *strBufferResult, tSize szBufferResult, const tChar *strFormat)
This function creates a new cString object from a boolean value.
static tVoid ToType(const tChar *strString, tFloat64 &f64Value)
This function converts the string to a floating-point value.
static tVoid ToType(const tChar *strString, tInt64 &i64Value)
This function converts the string to an integer value.
static const tSize InvalidPos
used to identicate out of range, invalidpos or default length
static tInt CompareNoCase(const tChar *str1, const tChar *str2, tSize nPos, tSize nLength)
This function compares a cString object with another string using the generic-text function _tcsicmp.
static tBool IsInteger(const tChar *strToCheck, tSize nLength=InvalidPos)
Check if string content represents an integer value.
static tInt Compare(const tChar *str1, const tChar *str2, tSize nPos, tSize nLength)
This function compares two given strings using the generic-text function _tcscmp.
static tBool IsFloat(const tChar *strToCheck)
Check if string content represents a floating point value.
static tSize RFindFirstOfToken(const tChar *strString, const tChar *strTokenList, tSize szStartPos=InvalidPos, tSize nLength=InvalidPos)
This function searches the string for the last occurrence of a token (character) that is also contain...
static tVoid HexToType(const tChar *strString, tInt64 &i64Value)
This function converts a hexadecimal string representation to an integer value.
static tResult Format(tChar *strBufferResult, tSize szBufferResult, const tChar *strFormat,...)
Write formatted data to a string.
static const tChar * FromType(tInt64 i64Value, tChar *strBufferResult, tSize szBufferResult, const tChar *strFormat="")
This function creates a new cString object from a tInt64 value.
static tVoid TrimFunc(tChar *strStringBuffer, tSize nBufferLength, const tBool bLeft, const tBool bRight, const tBool bNumeric)
This function removes whitespace and redundant zero characters from a string object.
static tVoid ToType(const tChar *strString, tUInt32 &ui32Value)
This function converts the string to an integer value.
static tBool IsNumber(tChar c)
This function checks if a tChar is a number.
static tChar * Delete(tChar *strString, tSize nPos, tSize nLength=InvalidPos)
This function deletes characters from a string.
static tVoid ToType(const tChar *strString, tInt32 &i32Value)
Escape control characters.
static const tChar * FromType(tFloat32 f32Value, tChar *strBufferResult, tSize szBufferResult, const tChar *strFormat)
This function creates a new cString object from a float value.
static tSize GetLength(const tChar *pcStr)
Returns the length of the string.
static tBool IsEqualNoCase(const tChar *str1, const tChar *str2, tSize nPos, tSize nLength)
This function checks if the two strings are equal (case insensitive)
static tBool IsSymbolChar(tChar c)
This function checks if a given tChar value is valid to be used in a symbol name.
static tChar * Copy(tChar *pstrDestination, const tChar *pstrSource, tSize nCount=InvalidPos, tSize nDestinationBufferSize=InvalidPos)
Copies a null terminated string to another string buffer.
static const tChar * FromType(tInt32 i32Value, tChar *strBufferResult, tSize szBufferResult, const tChar *strFormat="")
This function creates a new cString object from a tInt32 value.
tUInt64 tHashKey
Defines the Type for the Hashkey generated with GetHash.
static tSize FindFirstOfToken(const tChar *strString, const tChar *strTokenList, tSize szStartPos=0, tSize nLength=InvalidPos)
This function searches the string for the first occurrence of a token (character) that is also contai...
static tVoid ToType(const tChar *strString, tUInt64 &ui64Value)
This function converts the string to an integer value.
static const tChar * FromType(tUInt32 ui32Value, tChar *strBufferResult, tSize szBufferResult, const tChar *strFormat="")
This function creates a new cString object from a tUInt32 value.
static tInt Compare(const tChar *str1, const tChar *str2, tSize nLength=InvalidPos)
This function compares two given strings using the generic-text function _tcscmp.
static tHashKey GetHash(const tChar *strToHash)
Creates a hash key from the string.
static tSize FindFirstNotOfToken(const tChar *strString, const tChar *strTokenList, tSize szStartPos=0, tSize nLength=InvalidPos)
This function searches the string for the first occurrence of a token (character) that is not also co...
static tBool IsEqual(const tChar *str1, const tChar *str2, tSize nLength=InvalidPos)
This function checks if the two strings are equal (case sensitive)
static tChar * PushFront(tChar *strDest, tSize szDestSize, const tChar *strSource, tSize nCount)
This function adds the content of one string to the beginning of another string.
static tBool IsWhiteChar(tChar c)
This function checks if a given tChar value is a whitespace character.
static const tChar * FromType(tFloat64 f64Value, tChar *strBufferResult, tSize szBufferResult, const tChar *strFormat)
This function creates a new cString object from a double value.
static tVoid ToType(const tChar *strString, tBool &bBool)
This function converts the string to a boolean value.
static tInt CompareNoCase(const tChar *str1, const tChar *str2, tSize nLength=InvalidPos)
This function compares a cString object with another string using the generic-text function _tcsicmp.
static tBool IsEqual(const tChar *str1, const tChar *str2, tSize nPos, tSize nLength)
This function checks if the two strings are equal (case sensitive)
static tBool IsEqualNoCase(const tChar *str1, const tChar *str2, tSize nLength=InvalidPos)
This function checks if the two strings are equal (case insensitive)
static tVoid ToType(const tChar *strString, tFloat32 &f32Value)
This function converts the string to a floating-point value.
static const tChar * m_pcSafeBuffer
Internally used character buffer.
static tBool IsOneOf(tChar cValue, const tChar *strTokenList)
Checks if the character is contained in the token list.
static tBool IsNumeric(const tChar *strToCheck)
Check if string content represents a numeric value.
static tChar * Repeat(tChar *strDest, tSize szDestSize, tSize nCount, tChar cCharacter)
Fill a string with a repetitive character sequence.
static const tChar * FromType(tUInt64 ui64Value, tChar *strBufferResult, tSize szBufferResult, const tChar *strFormat="")
This function creates a new cString object from a tUInt64 value.
static tSize GetLength(const tChar *pcStr, tSize nMaxLength)
Returns the length of the string.
static tInt Scan(const tChar *strStringToScan, const tChar *sFormat,...)
This function reads data from the input string and writes the data into the location(s) given by argu...
static tHashKey32 GetHash32(const tChar *strToHash)
Creates a hash key from the string.
ADTF A_UTIL Namespace - Within adtf this is used as adtf::util or adtf_util.
std::string format(const char *str_format,...)
printf()-like formatting of an input string.