How to count each character in a message

Freddud's icon

Hi,
I would like to separate each character in a message box. for example "this message" would become: "t" "h" "i" "s" " " "m" "e" "s" "s" "a" "g" "e".
I've found no solution with the zl objects.
Thanks a lot

KrisW's icon

yes i would also like to know . as far as i can imagine it for now - only javascript - where u can easily do operations on a string :/ are you familiar with it ?

var ss = "this message";
var result = ss.length;

pdelges's icon

"my message" -> spell -> itoa -> print

p

Freddud's icon

Super,
thanks a lot Patrick

Jan M's icon
Max Patch
Copy patch and select New From Clipboard in Max.

You can do this also with [regex]:

Jan

Luke Hall's icon

You could also use something like [jstrigger (a.toString().length)] if you want to count the spaces and punctuation too. It's possible to do the splitting this way too with [jstrigger (a.toString().replace(","," ","g").split(""))] but much easier to use the [regex] or [spell] methods above.