check for the same cahr in two strings