Hello,
Yes I tried that and it didn't work to split with space charecter. Will try again.
thank you
Damjan
You need to split with endline character .split("\n")
Hi Ighor,
I tried that also with code below:
var variablePath = "D:\\";
var logFile = variablePath + "config.txt";
var string = trader.fileReadAll(logFile);
var array = string.split("\n");
trader.log("1.:" + array[0]);
trader.log("2.:" + array[1]);
trader.log("3.:" + array[2]);
trader.log("4.:" + array[3]);
and as result I get
19:15:51> 1.:#comment value1=25.0 #comment value2=25.5 value3=25.6
19:15:51> 2.:undefined
19:15:51> 3.:undefined
19:15:51> 4.:undefined
I have uploaded config file to cloud server
https://ufile.io/jv2niThank you
Damjan
Try to add ';' at end of each line and use ';' as split value.
It more JavaScript question than Qt, so better ask JavaScript experts.