I know this is simple. Have a small to large string. Replace a 'Key' within that string with what I want replaced... Heres a small example, then the issue I'm having in my head...
Based on user input, it would be either of the 5. But. Rather then storing 5 full string variables, I'd like to just replace the value in the string.
I know that this would be the best piece of code for the single replacement...
Heres my problem:
I will often have the case where I may need more then 1 Replacement in the string. How do I go about this? =\
Code:
/* One replacement string */
string replace = "Increases your attack power by ~R~ for every 180 armor value you have.";
string[] replace_with = new string[] { "1","2","3","4","5" };
I know that this would be the best piece of code for the single replacement...
Code:
replace.Replace("~R~", replace_with[user_select]);
I will often have the case where I may need more then 1 Replacement in the string. How do I go about this? =\
Comment