How to get split value from string.find?

string.find("abcdefg", "cde")

prints “3 5”
not 3 and 5
i need only 5

so i tried split them

print(string.split(string.find("abcdefg", "cde")," "))

so this prints
{ [1] = “3” }

how to get only 5

1 Like
local i, j = string.find("abcdefg", "cde")
print(i,j) --> 3, 5

Then only use j

2 Likes