Sha256: 63dc4ac7b9a25a227eb8154dd7b2810e93eaae235826c3cd5567a84df5d07067
Contents?: true
Size: 338 Bytes
Versions: 327
Compression:
Stored size: 338 Bytes
Contents
defmodule Isogram do @doc """ Determines if a word or sentence is an isogram """ @spec isogram?(String.t) :: boolean def isogram?(sentence) do codepoints = sentence |> String.downcase |> String.replace(~r/\s|-/u, "") |> String.codepoints length(Enum.uniq(codepoints)) == length(codepoints) end end
Version data entries
327 entries across 327 versions & 1 rubygems