version 1.2, 2015/04/20 18:10:35
|
version 1.3, 2015/04/20 18:20:37
|
|
|
namespace ut | namespace ut |
{ | { |
#if (MI_CHAR_TYPE == 1) | #if (MI_CHAR_TYPE == 1) |
# define T(X) X |
|
typedef std::string String; | typedef std::string String; |
#else | #else |
# define T(X) L##X |
|
typedef std::wstring String; | typedef std::wstring String; |
#endif | #endif |
| |
// primitive converion of MI_Char to char - mostly for debugging printouts |
// primitive converion of ZChar to char - mostly for debugging printouts |
std::string StrToChar(const String& str); | std::string StrToChar(const String& str); |
| |
// array <--> string converions like "A,B,C" <-> ["A","B","C"] | // array <--> string converions like "A,B,C" <-> ["A","B","C"] |
void StringToArray( | void StringToArray( |
const MI_Char* str, |
const ZChar* str, |
std::vector<String>& res, | std::vector<String>& res, |
MI_Char delim = ','); |
ZChar delim = ','); |
| |
String ArrayToString( | String ArrayToString( |
const std::vector<String>& ar); | const std::vector<String>& ar); |