I have managed to read a file name and two strings. Now I need to search the file for a lines that maches string1 and replace them with string2. And I have no idea how to do that. Can anyone help me please.
what operating system ? what version assembly language? what assembler?
Essentually you have to open two files -- input file for input and result (output) file for output. In a loop, read a line from the input file, then write to the output file either the original file or the replacement. Finally close both files.
I recommend you check out the repe cmpsb string command. It is used to compare two strings for equality.
Also, listen to Ancient Dragon. He knows what he is talking about. Unless you know exactly what tricky stuff to do, you must do it as he suggested: read the source file while writing a new file. Once done, you can delete the source file and rename the new file to have the same name that the source file did, if you want.
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...
I am writing a java program that needs to execute shell commands, so I wrote a function that would take the command to execute as a string (ie: "mkdir ~/Folder1") and execute that command with the shell. Here is the function:
Runtime run = Runtime.getRuntime();
Process pr = ...
Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.