Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef UCONVERSION_H
00021 #define UCONVERSION_H
00022
00023
00024
00025 #include <string>
00026 #include <vector>
00027 #include <stdarg.h>
00028
00051 std::string uReplaceChar(const std::string & str, char before, char after);
00052
00067 std::string uReplaceChar(const std::string & str, char before, const std::string & after);
00068
00080 std::string uToUpperCase(const std::string & str);
00081
00093 std::string uToLowerCase(const std::string & str);
00094
00100 std::string uNumber2Str(unsigned int number);
00106 std::string uNumber2Str(int number);
00112 std::string uNumber2Str(float number);
00118 std::string uNumber2Str(double number);
00119
00126 std::string uBool2Str(bool boolean);
00134 bool uStr2Bool(const char * str);
00135
00151 std::string uBytes2Hex(const char * bytes, unsigned int bytesLen);
00166 std::vector<char> uHex2Bytes(const std::string & hex);
00181 std::vector<char> uHex2Bytes(const char * hex, int hexLen);
00182
00199 std::string uHex2Str(const std::string & hex);
00200
00213 unsigned char uHex2Ascii(const unsigned char & c, bool rightPart);
00214
00227 unsigned char uAscii2Hex(const unsigned char & c);
00228
00232 std::string uFormatv (const char *fmt, va_list ap);
00233
00237 std::string uFormat (const char *fmt, ...);
00238
00239 #ifdef WIN32
00240
00244 wchar_t * createWCharFromChar(const char * text);
00245
00250 char * createCharFromWChar(const wchar_t * wText);
00251 #endif
00252
00253 #endif