I want to change the text in a .txt with just a few lines of code but have not been able to find anything that, to a 100%, fulfills my purpose.
This is how the situation looks like:
- I have a .txt-file with the text "1"
- I want to change the text in this file from "1" to "2" with Javascript.
This is how I imagine it to look like:
File myFile = "myTextDoc.txt";
myFile.text = "2";
I know this ain't the right way but I hope it can better picture how I want it to work.
Thanks
Edit: I know how to get the text from the -txt-file to a string and change it but I don't know and send it back to the .txt-file.