In moonscript, how can I iterate over characters in a string?
I tried iterating as if the string was a table, but that did not work:
s = "hello"
for c in *s
print c
In moonscript, how can I iterate over characters in a string?
I tried iterating as if the string was a table, but that did not work:
s = "hello"
for c in *s
print c
Following lua equivalents:
Iterate by index and substring
Iterate using pattern matching
For unicode strings, you can use: