Board Thread:Support Requests - Getting Technical/@comment-45606548-20200906151533/@comment-9605025-20200906195454

Well, if Arrays isn't available on UCP, then it doesn't matter. However, Arrays would have made it much easier since it actually keeps all the parts when splitting the input string. As such (and because it is a standard thing with arrays), it has a function that returns the length of the array.

The #explode function, on the other hand, just returns one part at a time and does not have a way to directly return the total number of parts. As far as I can tell, there is no way to extract that number from the string. However, there is an imperfect workaround you can use. Instead of using #loop, use #while.

Ideal Solution Using Arrays

Workaround Using #while Instead of #loop

This workaround is imperfect because the loop will terminate early if the input for the parameter contains 2 or more consecutive delimiters.