How to Swap Data Between txt File
-
hi all
i like to know is there any class for example do this:
we have two txt file with names 1 , 2.1:
hi
yes2:
goodbye
nonow in want swap this Data to be like this:
1:
goodbye
no2:
hi
yes
thanks -
Hi,
No there's nothing pre-built for that. You'll have to open your files with QFile, parse their content e.g. to a QStringList, move things around, join back as a string and then overwrite the original data.
There might be other solutions though