Question, how to divide one long string to several short string values (mql5)

 

about mql5 string function

For example,

before: string testr = "macd,9,13,26";

after:

testr1="macd";

testr2=9;

testr3=13;

testr4=26;

Here need to work with a long string with several ","(or others like "-")characters within it and then divide into different short strings, the number of short string/number can be more than 10.

I found mql5 string functions chm files and website but get no answer, anyone have good solutions? 

 
string testX[];
if(StringSplit(testr,',',testX)!=-1)
...
 
Alain Verleyen:


Great, got it, thanks for your kindly comment, Alain. 

Reason: