53#include "EuException.h"
58#if defined (_MSC_VER) || defined(__MINGW32__)
62#if defined(__MINGW32__) || defined (__GNUC__) || defined(__BORLANDC__)
82 namespace StdStringFunctions
232 template <
typename T> std::string
toHexstr(
const T & rValue, std::size_t hex_len =
sizeof(T) << 1 )
234 static const char * t_chDigits =
"0123456789ABCDEF";
235 std::string t_sRetVal( hex_len,
'0' );
237 for (
size_t i = 0, j = ( hex_len-1 )*4 ; i<hex_len; ++i,j-=4 )
239 t_sRetVal[i] = t_chDigits[(rValue>>j) & 0x0f];
404 std::vector<std::string> & rTokensVector,
405 const std::string & rstrDelimiters =
" " );
427 std::vector<std::string> & rTokensVector,
428 const char & rcDelimiters =
' ' );
448 std::vector<std::wstring> & rTokensVector,
449 wchar_t wcDelimiters = L
' ' );
474 const std::string & rsIns );
477 const std::wstring & rsIns );
504 const std::string & rsFnd,
505 const std::string & rsRep );
507 const std::wstring & rsFnd,
508 const std::wstring & rsRep );
534 const char pzOriginal,
563 std::vector<std::size_t> & rPosVector,
564 const char pzOriginal,
675 const std::string & rsString );
677 const std::wstring & rsString );
704 #if defined(_MSC_VER) || defined(__MINGW32__)
725 #elif defined(__GNUC__) || defined(__BORLANDC__)
744 #if defined(_MSC_VER) || defined(__MINGW32__)
759 #if defined(__GNUC__) || defined(__BORLANDC__)
786 namespace TimeFunctions
878 const std::string & rsFormat =
"%Y.%m.%d - %X" );
921 unsigned int uiMonth,
__tool_export_dll std::size_t replaceAll(std::string &rsText, const std::string &rsFnd, const std::string &rsRep)
Exchanges all searched substrings in a string with another passed string.
__tool_export_dll std::wstring string2wstring(const std::string &rsSourceString)
__tool_export_dll void tokenizeString(const std::string &rstrSource, std::vector< std::string > &rTokensVector, const std::string &rstrDelimiters=" ")
__tool_export_dll void fillString(std::string &rstr, char cFillItem, std::size_t nNumber, EnStrPos ePos)
__tool_export_dll char * getFilledString(const char *pch, char cFillItem, std::size_t nNumber, EnStrPos ePos)
__tool_export_dll void colorConsoleCout(const std::string &rsCoutText, EnCoutColor eForeGroundColor, EnCoutColor eBackGroundColor)
Outputs a string to the console in color.
__tool_export_dll bool isAnInteger(const std::string &rstr)
__tool_export_dll bool compareWildcardString(const std::string &rsSearchString, const std::string &rsString)
Compares two std::string's.
__tool_export_dll bool insertIfNotAvailable(std::string &rsText, std::size_t nPos, const std::string &rsIns)
Inserts a string at the position passed, if not already present.
EnStrPos
Definition EuStdFunctions.h:144
@ eBEFORE
Definition EuStdFunctions.h:154
@ eBOTH
Definition EuStdFunctions.h:174
@ eBEHIND
Definition EuStdFunctions.h:164
__tool_export_dll void trimString(std::string &rstr, char c=' ', EnStrPos ePos=eBEFORE)
Trim for std::string inspired by:
__tool_export_dll std::string toUpper(const std::string &rstr)
Converts all lowercase letters of the passed string to uppercase.
__tool_export_dll WORD setColorConsoleCout(EnCoutColor eForeGroundColor, EnCoutColor eBackGroundColor)
__tool_export_dll std::string toLower(const std::string &rstr)
Converts all uppercase letters of the passed string to lowercase.
__tool_export_dll void resetColorConsoleCout(WORD wScreenBufferInfo)
std::string toHexstr(const T &rValue, std::size_t hex_len=sizeof(T)<< 1)
Definition EuStdFunctions.h:232
__tool_export_dll std::string wstring2string(const std::wstring &rwsSourceString)
EnCoutColor
Definition EuStdFunctions.h:95
@ eCOLOR_BLUE
Definition EuStdFunctions.h:98
@ eCOLOR_BLACK
Definition EuStdFunctions.h:97
@ eCOLOR_GRAY
Definition EuStdFunctions.h:105
@ eCOLOR_RED
Definition EuStdFunctions.h:101
@ eCOLOR_GREEN
Definition EuStdFunctions.h:99
@ eCOLOR_DEFAULT
Definition EuStdFunctions.h:96
@ eCOLOR_LIGHTBLUE
Definition EuStdFunctions.h:100
@ eCOLOR_WHITE
Definition EuStdFunctions.h:106
@ eCOLOR_MAGENTA
Definition EuStdFunctions.h:102
@ eCOLOR_YELLOW
Definition EuStdFunctions.h:103
@ eCOLOR_LIGHTGRAY
Definition EuStdFunctions.h:104
__tool_export_dll std::string getMonth(unsigned int uiMonth)
__tool_export_dll std::string getMilitarySystemTime()
__tool_export_dll std::string getMilitaryTime(const std::time_t &rTime)
__tool_export_dll std::time_t getTime(unsigned int uiYear, unsigned int uiMonth, unsigned int uiDay, unsigned int uiHour, unsigned int uiMin, unsigned int uiSec)
__tool_export_dll std::string getTimeString(const std::time_t &rTime, const std::string &rsFormat="%Y.%m.%d - %X")
__tool_export_dll std::string getSystemTimeString(const std::string &rsFormat="%Y.%m.%d - %X")