Now treating a string as an array of chars isn’t a bad idea. Lucee already courts that when it lets you do
foo = 'test'
foo[ 1 ]
Of course, you can also iterate over the chars in a string by using an empty delimiter, but I assume the for x in y
syntax doesn’t allow you to use a non-standard delimiter which sort of screws that up. You’d have to explicitly convert it to an array with foo.listToArray( '' )
but that also wouldn’t work in this scenario due to the long standing bug of string and list member functions not working when the underlying Java object isn’t a string.