You can open a file in random access mode and change only parts of it. However as text files use Unicode encoding it will be very hard to find the right position.
I recommend you to open the file, read the lines one by one or everything at once. Edit the text and save it to a new file.
|