Function to check if a string contains another string