Dataflow Runtime API  3.1.1.0
Static Public Member Functions | List of all members
imt::base::core::util::CharUtil Class Reference

String Utility class pure static class. More...

#include <Imt.Base.Core.Util/CharUtil.h>

Static Public Member Functions

static bool toInt (const wchar_t asciiHexChar, int32_t &result)
 Returns the int value of an ASCII formatted hex character. More...
 
static bool toInt (const char_t asciiHexChar, int32_t &result)
 Returns the int value of an ASCII formatted hex character. More...
 
static bool toInt (const wchar_t *const pAsciiChars, const int32_t nrOfChars, int32_t &result)
 Converts an array of ASCII formatted characters to an int value. More...
 
static bool toInt (const char_t *const pAsciiChars, const int32_t nrOfChars, int32_t &result)
 Converts an array of ASCII formatted characters to an int value. More...
 
static bool toAsciiHex (const int32_t value, wchar_t &result)
 Returns the ASCII formatted hex character of the value. More...
 
static bool toAsciiHex (const int32_t value, char_t &result)
 Returns the ASCII formatted hex character of the value. More...
 
static bool isDigit (const wchar_t chr)
 Returns true if chr is one of '0'..'9'. More...
 
static bool isDigit (const char_t chr)
 Returns true if chr is one of '0'..'9'. More...
 
static bool isHexDigit (const wchar_t chr)
 Returns true if chr is one of '0'..'9' or 'a'..'f' or 'A'..'F'. More...
 
static bool isHexDigit (const char_t chr)
 Returns true if chr is one of '0'..'9' or 'a'..'f' or 'A'..'F'. More...
 

Detailed Description

String Utility class pure static class.

Member Function Documentation

◆ isDigit() [1/2]

static bool imt::base::core::util::CharUtil::isDigit ( const char_t  chr)
static

Returns true if chr is one of '0'..'9'.

Parameters
chrCharacter to test.
Returns
True if chr is a digit.

◆ isDigit() [2/2]

static bool imt::base::core::util::CharUtil::isDigit ( const wchar_t  chr)
static

Returns true if chr is one of '0'..'9'.

Parameters
chrCharacter to test.
Returns
True if chr is a digit.

◆ isHexDigit() [1/2]

static bool imt::base::core::util::CharUtil::isHexDigit ( const char_t  chr)
static

Returns true if chr is one of '0'..'9' or 'a'..'f' or 'A'..'F'.

Parameters
chrCharacter to test.
Returns
True if chr is a hex character.

◆ isHexDigit() [2/2]

static bool imt::base::core::util::CharUtil::isHexDigit ( const wchar_t  chr)
static

Returns true if chr is one of '0'..'9' or 'a'..'f' or 'A'..'F'.

Parameters
chrCharacter to test.
Returns
True if chr is a hex character.

◆ toAsciiHex() [1/2]

static bool imt::base::core::util::CharUtil::toAsciiHex ( const int32_t  value,
char_t result 
)
static

Returns the ASCII formatted hex character of the value.

e.g. 10 = 'A', 15 = 'F', 9 = '9'

Parameters
valueInput value.
resultResult containing the ASCII formatted character.
Returns
True if success.

◆ toAsciiHex() [2/2]

static bool imt::base::core::util::CharUtil::toAsciiHex ( const int32_t  value,
wchar_t &  result 
)
static

Returns the ASCII formatted hex character of the value.

e.g. 10 = 'A', 15 = 'F', 9 = '9'

Parameters
valueInput value.
resultResult containing the ASCII formatted character.
Returns
True if success.

◆ toInt() [1/4]

static bool imt::base::core::util::CharUtil::toInt ( const char_t *const  pAsciiChars,
const int32_t  nrOfChars,
int32_t result 
)
static

Converts an array of ASCII formatted characters to an int value.

e.g. "19872" = 19872 e.g. "-19872" = -19872

Parameters
pAsciiCharsASCII formatted characters.
nrOfCharsNumber of characters.
resultResult containing the int value.
Returns
True if success.

◆ toInt() [2/4]

static bool imt::base::core::util::CharUtil::toInt ( const char_t  asciiHexChar,
int32_t result 
)
static

Returns the int value of an ASCII formatted hex character.

e.g. 'A' = 10, 'f' = 15, '9' = 9

Parameters
asciiHexCharASCII hex character.
resultResult containing the int value of the hex char.
Returns
True if success.

◆ toInt() [3/4]

static bool imt::base::core::util::CharUtil::toInt ( const wchar_t *const  pAsciiChars,
const int32_t  nrOfChars,
int32_t result 
)
static

Converts an array of ASCII formatted characters to an int value.

e.g. "19872" = 19872 e.g. "-19872" = -19872

Parameters
pAsciiCharsASCII formatted characters.
nrOfCharsNumber of characters.
resultResult containing the int value.
Returns
True if success.

◆ toInt() [4/4]

static bool imt::base::core::util::CharUtil::toInt ( const wchar_t  asciiHexChar,
int32_t result 
)
static

Returns the int value of an ASCII formatted hex character.

e.g. 'A' = 10, 'f' = 15, '9' = 9.

Parameters
asciiHexCharASCII hex character.
resultResult containing the int value of the hex char.
Returns
True if success.

The documentation for this class was generated from the following file: