compare the given strings