VBScript: What is the simplest way to format a string?
问题 I have the following format: Value1 is {0} and Value2 is {1}. I need to replace the numbers in the brackets with strings. This is easily done in most languages using string.Format or something along those lines. How can I do this using only vbscript? I've tried: Replace (strFormat, "{0}", value1) Replace (strFormat, "{1}", value2) It does not work. Any solutions? 回答1: Replace (strFormat, "{0}", value1) Based on your code snip, I'm guessing you believe Replace mutates strFormat directly. It