Hi,
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 ?
an help?
"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
Thank's !
so if find return is différent to -1, my word exist in the text !
Exactly.
Develop games in your browser. Powerful, performant & highly capable.
ok