difference between lua find and c++ find

Lua:
string.find(“testthis”, 5,5,7)
this is going to give you “th”. Meaning it will start from the 5th letter and give the next letters between 5 and 7.
C++ / C
string str=”testthis”
str.find(5,5);
this will start from the fifth element and give you the next 5 letters.
Basically in lua, it gives the letters between 5 and 7, but in c++ its basically the length of the string.

Leave a Reply

Your email address will not be published. Required fields are marked *