contain() and containi() return the index of the match. If it does not contain the string, it returns -1 (which will return true if used directly as the condition of an if statement). So, to properly check if a string contains another string, you need to use:
Code:
if( contain() >= 0 )
or
Code:
if( contain() != -1 )
P.S. you are reading the file incorrectly in your loop. You should use fgets() as the while loop condition. Also, you are potentially going to cause an index out of bounds because you are using the wrong value for the third argument of fgets(). You need to use charsmax(szFileData) instead of 50000.
__________________