This forum is in read-only mode now. You may discuss your questions on forums of MQL4.community and MQL5.community

string function question


Back to topics list
avatar
7
whatchee 2005.06.15 14:20 
I want to replace a portion of a string variable, what should I do, the following does not work

try to replace 3 by 0:

string a="12345";
StringSetChar(a,2,0);

the string remains the same

Besides, is there a complete list of functions, or a manual that can download?
tks
avatar
120
hdb 2005.06.15 14:31 
the manual says:

Sample

string str="abcdefgh";
string str1=StringSetChar(str, 3, 'D');
// str1 is "abcDefgh"


so I guess quotes are needed unless u wanted to replace it by the chr(0) - not sure the compiler handlesthis.

Yes, a downloadable documentation would be nice..
Back to topics list  
Download MetaTrader 5 (450 Kb, web installer) — a new terminal for financial markets