Quick way to determine the length of a string "array"


#1

Would like to determine how many elements in a string “array” such as:

String = “zero, one, two , three”

This has four elements which can be accessed using:

arrayitem(n, String)

So other than looping through the string to count how many commas it contains, is there an easier way?

Thanks!


#2

You should be able to use count(string). It will count any true values (non-zero/not empty).


#3

Excellent, I saw that function in https://wiki.webcore.co/Functions#Integers But I assumed it was for Integers … it worked perfectly.

Thanks!

James