Ti_Thom
18th October 2006, 17:25
Hi,
i am writing a piece of code where i modify a file (add and remove entire lines).
The problem is that i am unable to grab the last empty line. The current code is :
QStringList file_text;
while (!in.atEnd()) {
QString line = in.readLine();
file_text.push_back(line);
}
file.close();
//processing the lines and then save
is there any way to get the last empty line ? (or at least to detect if there is one)
i am writing a piece of code where i modify a file (add and remove entire lines).
The problem is that i am unable to grab the last empty line. The current code is :
QStringList file_text;
while (!in.atEnd()) {
QString line = in.readLine();
file_text.push_back(line);
}
file.close();
//processing the lines and then save
is there any way to get the last empty line ? (or at least to detect if there is one)