Is there a way for the format string used in a call to string.format to contain a { character that is not used for substring insertion?
For example how could I do this…
string.format("my format has this { in it {0}", abc);
returning…
"my format has this { in it abc"
I need to do this as the string I am creating in HTML and will contan a script block of javascript.
Thank you
Yup, you just need to double it:
See the “escaping braces” section on the MSDN page for Composite Formatting for more details.