I’m John C Bland II

Husband, Father, Tech Author, Deacon.
Founder of Katapult Media, and full-stack polyglot developer.
Political Free Agents Podcast Host.

I create. I launch.

YouTube Channel

I post regular fun on YouTube like me playing the bass and anything else I find fun. 

Get Something Built

All project work goes through Katapult Media. Business is open. Let’s chat.

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.