Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
i would like to know how to test if a word is in a text.
i try with "find", but the result is curious. 0 ? -1 ?
"Find" returns position (starting from 0) of the search string, or -1 if string not found.
Find("abcdefgh", "ab") returns 0
Find("abcdefgh", "cd") returns 2
Find("abcdefgh", "xyz") returns -1
Develop games in your browser. Powerful, performant & highly capable.
so if find return is différent to -1, my word exist in the text !