How do you separate each character from a string?

I am working on a project that uses an Enumeration with a list of 5 letter words and a microflow to retrieve a word from the list at random. Once the word is retrieved in a microflow, I need to separate each character of the word (example: Apple, needs to be broken into A/P/P/L/E) I think the difficulty is because the word is generated at random. How would I go about this? I looked into Substrings and into community commons but haven’t been able to figure it out.   
2 answers

Try the StringSplit java action in CommunityCommons, pass your random string as inputString parameter and an empty string (‘’, that is, not “empty”) as splitParameter. You should get a list of SplitItems with a character as the value.


Hi Curtis,

Find the length of the string using that while loop with length > 0 and use substring(string, length-1, 1). 

Refer the below mentioned question, in that you can find the way to separate the characters.