I have various text files containing code. Some of the code is in strings. I want to write a macro that will change this text:
code; code; code; function("string1"); code;
code; code; function("string1"); code; code;
into this text:
bigstring = "string1string2"
code; code; code; function(bigstring, start0, finish6); code;
code; code; function(bigstring, start7, finish13); code; code;
In other words, I need something that will open a file, find each example of a certain function, change it in the way I want, and then save the file and go onto the next one. Any suggestions?
2006-12-09
05:16:46
·
6 answers
·
asked by
Chris T
1
in
Computers & Internet
➔ Programming & Design
I should maybe explain that I am using a game authoring tool (Sludge), based on C++ but with a very limited set of commands. And the finished code has to be accepted by the tool's own compiler so I can't try anything too clever. Thanks for the suggestions so far - I am looking into them with great interest.
2006-12-09
05:48:58 ·
update #1