40 lines
No EOL
1.7 KiB
MQL5
40 lines
No EOL
1.7 KiB
MQL5
#define STRING_LEN (sizeof(uint) * 16) // Выравнивание по uint
|
|
|
|
struct STRING
|
|
{
|
|
//private: // https://www.mql5.com/ru/forum/1111/page2274#comment_8563787
|
|
uchar Array[STRING_LEN];
|
|
|
|
public:
|
|
//void operator =( const int ) const
|
|
//{
|
|
// return;
|
|
//}
|
|
|
|
void operator =( const string &Str )
|
|
{
|
|
if (Str == NULL) // https://www.mql5.com/ru/forum/1111/page2323#comment_9414672
|
|
this.Array[0] = 0;
|
|
else
|
|
::StringToCharArray(Str, this.Array);
|
|
|
|
return;
|
|
}
|
|
|
|
// void operator =( const string Str )
|
|
// {
|
|
// if (Str == NULL) // https://www.mql5.com/ru/forum/1111/page2323#comment_9414672
|
|
// this.Array[0] = 0;
|
|
// else
|
|
// ::StringToCharArray(Str, this.Array);
|
|
//
|
|
// return;
|
|
// }
|
|
|
|
string Get( void ) const
|
|
{
|
|
return(::CharArrayToString(this.Array));
|
|
}
|
|
};
|
|
|
|
#undef STRING_LEN |