Hello, Tempers.
I'd like to ask if someone could very please help me and my cousin with converting a text file. He is coding a level for StarCraft 2 at the moment, and he needs some help on formatting text files quickly, hopefully in an automated way.
What my cousin has is a text file with a collection of random words like so:
CODEcat
dog
chill
wet
dry
cold
sausage
hair
thick
And so forth...
He wants a way to convert every row into something like this:
CODElv_setup_intiger = (lv_setup_intiger + 1);
gv_words[lv_setup_intiger] = "cat";
lv_setup_intiger = (lv_setup_intiger + 1);
gv_words[lv_setup_intiger] = "dog";
lv_setup_intiger = (lv_setup_intiger + 1);
gv_words[lv_setup_intiger] = "chill";
lv_setup_intiger = (lv_setup_intiger + 1);
gv_words[lv_setup_intiger] = "wet";
lv_setup_intiger = (lv_setup_intiger + 1);
gv_words[lv_setup_intiger] = "dry";
lv_setup_intiger = (lv_setup_intiger + 1);
gv_words[lv_setup_intiger] = "cold";
lv_setup_intiger = (lv_setup_intiger + 1);
gv_words[lv_setup_intiger] = "sausage";
lv_setup_intiger = (lv_setup_intiger + 1);
gv_words[lv_setup_intiger] = "hair";
lv_setup_intiger = (lv_setup_intiger + 1);
gv_words[lv_setup_intiger] = "thick";
And so forth....
Essentially, he wants to take the first word of each row of the text file, and place it within the brackets of the second row of the code, following "gv_words[lv_setup_intiger] ="
I need to know if there's any kind of program or batch file that could be made to generate or overwrite a text file to do something like this. Any help at all can be credited to the person who wants and who helps. If you cannot help, you can point to websites that can help, as it would very helpful.
The text file consists of somewhere between 100 & 9000 words, so converting it manually would be a big hassle.
Thanks in advance,
Ace Faith
I'd like to ask if someone could very please help me and my cousin with converting a text file. He is coding a level for StarCraft 2 at the moment, and he needs some help on formatting text files quickly, hopefully in an automated way.
What my cousin has is a text file with a collection of random words like so:
CODEcat
dog
chill
wet
dry
cold
sausage
hair
thick
And so forth...
He wants a way to convert every row into something like this:
CODElv_setup_intiger = (lv_setup_intiger + 1);
gv_words[lv_setup_intiger] = "cat";
lv_setup_intiger = (lv_setup_intiger + 1);
gv_words[lv_setup_intiger] = "dog";
lv_setup_intiger = (lv_setup_intiger + 1);
gv_words[lv_setup_intiger] = "chill";
lv_setup_intiger = (lv_setup_intiger + 1);
gv_words[lv_setup_intiger] = "wet";
lv_setup_intiger = (lv_setup_intiger + 1);
gv_words[lv_setup_intiger] = "dry";
lv_setup_intiger = (lv_setup_intiger + 1);
gv_words[lv_setup_intiger] = "cold";
lv_setup_intiger = (lv_setup_intiger + 1);
gv_words[lv_setup_intiger] = "sausage";
lv_setup_intiger = (lv_setup_intiger + 1);
gv_words[lv_setup_intiger] = "hair";
lv_setup_intiger = (lv_setup_intiger + 1);
gv_words[lv_setup_intiger] = "thick";
And so forth....
Essentially, he wants to take the first word of each row of the text file, and place it within the brackets of the second row of the code, following "gv_words[lv_setup_intiger] ="
I need to know if there's any kind of program or batch file that could be made to generate or overwrite a text file to do something like this. Any help at all can be credited to the person who wants and who helps. If you cannot help, you can point to websites that can help, as it would very helpful.
The text file consists of somewhere between 100 & 9000 words, so converting it manually would be a big hassle.
Thanks in advance,
Ace Faith








