If I have a string is it possible to iterate the each character in the string and print it one at a time?
For instance:
I have a string as a variable
local message = "Welcome"
Now I want it to print.
"W" "E" "L" "C" "O" "M" "E"
Instead of printing, "Welcome"
How would I do this?
Edit: Moved some text to a code block to preserve formatting.
An easy application of gmatch will allow you to do this. Just use "(%w)" as the string pattern
EX
for w in string.gmatch("Pizza", "(%w)") do -- 'w' represents the individual letter returned print(w) end