Why the function string.find in this case returns 1,1 ?
s2 = "299439"
i, j = string.find(s2, ".")
print(i, j)
Why the function string.find in this case returns 1,1 ?
s2 = "299439"
i, j = string.find(s2, ".")
print(i, j)
This function uses pattern matching for search. Pattern “.” means any symbol.
If you want to find a dot, use “%.”:
i, j = string.find(s2, "%.")