Text file

  • Thread starter Thread starter Ondro
  • Start date Start date
O

Ondro

Hello.
Can anybody help me?
I have text file.
And I want change any line to new line. But I don't want write all other
line, only change 1 line.
Thanks
 
Hi Ondro,

When it is a textfile on disk and you want to change 1 character you have to
read in completly first in memory and write that back.

You can do that reading and writing line by line or by reading the complete
file and writing the complete file. There are no other alternatives.

(When you not use any kind of database)

I hope this helps

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top