Answer the question
In order to leave comments, you need to log in
How to loop through an array of strings?
There is an array of strings, you need to access each and read character by character:
lines = {
"sdss",
"vfbf"
}
for i=1,#lines do
line = lines[i]
for j=1, #line do print(line[j]) end
end
Answer the question
In order to leave comments, you need to log in
for i = 1, #lines do
line = lines[i]
for j = 1, #line do
print(string.sub(line, j, j))
end
end
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question