This question already has an answer here:
I'm a fan of anagrams, so given two strings
s2 write a program or function that outputs a truthy value if
s2 is an anagram of
s1, and a falsey value otherwise (not accounting for spaces and capital letters).
s1 = "Anagram"; s2 = "Nag a ram"
s1 = "stack overflow"; s2 = "fewer kool cats"
s1 = "apple rocks"; s2 = "paler spock"
- Program and function allowed.
- Shortest code in bytes wins.