Advertisement
zvoulgaris

Anagram Checker

Oct 18th, 2019
2,051
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Julia 0.17 KB | None | 0 0
  1. # Anagram checker
  2.  
  3. SortedLetters(x::AbstractString) = sort(split(lowercase(x), ""))
  4.  
  5. AreAnagrams(x::AbstractString, y::AbstractString) = (SortedLetters(x) == SortedLetters(y))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement