I’ve been wanting to do this for a while but never got around to it (like numerous other things). I noticed this in the docs this week and got a bit excited.
If you have used languages like .NET, Java, etc you are probably familiar with something like (in .NET) String.format(“Hi, {0}. I like your {1}.”, “John”, “shoes”);. {0} turns into “John” and {1} into “shoes” which is nice because I could actually make the input string “Hi, {0}. I like your {1}. {0}, may I borrow them?” and it would replace all {0}’s with “John” and so forth.
Adobe snuck in a function to do the same exact thing. Here is an example from LIveDocs:
bq. StringUtil.substitute(“Hi, {0}. I like your {1}. {0}, may I borrow them?”, “John”, “shoes”);.
Kinda cool huh? This is VERY useful and helps keep down the need to concat (which can get ugly).
Just a quick tip…hope it helps.