Reading a File

Vino vino.bheeman at hotmail.com
Tue Nov 28 18:10:16 UTC 2017


Hi All,

   Need your help, I have file which contains 3 lines, I need to 
ignore the line's which does not have the sign "=", in the blow 
example the 3rd  line(FileName2) and store the result in a array, 
I was able to ignore the line which contains '#" and empty lines 
, but need to help on how to filter the lines which does not have 
the sign "=".

string ConfigFile = Test.txt
#This is a Sample File
FileName1 = test1.txt
FileName2

auto PLines = 
Array!string(File(ConfigFile).byLineCopy().filter!(line => 
!line.all!isWhite && line[0].isAlpha));

From,
Vino.B


More information about the Digitalmars-d-learn mailing list