Anagrams - function to check if a given pair of strings is an anagram