MQL4 Reference
String functions
StringConcatenate
| string StringConcatenate( |
...) |
Forms a string of the data passed and returns it. Parameters can be of any type. Amount of passed parameters cannot exceed 64.
Parameters are transformed into strings according the same rules as those used in functions of Print(), Alert() and Comment().
The returned string is obtained as a result of concatenate of strings converted from the function parameters.
The StringConcatenate() works faster and more memory-saving than when strings are concatenated using addition operations (+).
Parameters:
| ... |
- |
Any values separated by commas. It can be up to 64 parameters. |
Sample:
string text;
text=StringConcatenate("Account free margin is ", AccountFreeMargin(), "Current time is ", TimeToStr(TimeCurrent()));
// slow text="Account free margin is " + AccountFreeMargin() + "Current time is " + TimeToStr(TimeCurrent())
Print(text);
|
|
|