How can I find out whether a whole string is uppercase in Elixir?
I've found a solution here. But it only addresses one letter at a time not the whole string.
You can use Regex:
iex> str = "Hello World"
iex> str =~ ~r(^[^a-z]*$)
false
iex> str = "HELLO WORLD"
iex> str =~ ~r(^[^a-z]*$)
true