Suppose you need a way to easily take a string with spaces and URL-encode it so you can put it in a URL (for example: ‘my cat’ becomes ‘my+cat’). You also have some numbers in string form that you want to add commas to (i.e convert 2348934 to 2,348,934).
In Apex, these are super simple because of the large library of available functions.
To URL-encode a string, you just write:
String encoded = EncodingUtil.urlEncode(myString, 'UTF-8');
and to format a string, you can just write:
response.outputStr = Integer.valueOf(inputStr).format()
But the fun part of Flow is not having to write code. String Changers provides a couple of actions that carry these out.
Strip Invalid Flow Name Characters
This action strips out any characters that can’t be used in an api name. One use of this: Use a formula in Flow to generate strings that include the running user and/or the current time and then strip out anything that will block the use of that string to name a flow.
The source code is available here and is a great template to convert other Apex string functions.