Sha256: 455d995400941209493a72b0c48e2f75748cc8be814a5e7c6413a24bfdee12ce

Contents?: true

Size: 466 Bytes

Versions: 69

Compression:

Stored size: 466 Bytes

Contents

defmodule Hexadecimal do
  @doc """
    Accept a string representing a hexadecimal value and returns the
    corresponding decimal value.
    It returns the integer 0 if the hexadecimal is invalid.
    Otherwise returns an integer representing the decimal value.

    ## Examples

      iex> Hexadecimal.to_decimal("invalid")
      0

      iex> Hexadecimal.to_decimal("af")
      175

  """

  @spec to_decimal(binary) :: integer
  def to_decimal(hex) do
  end
end

Version data entries

69 entries across 69 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.2.1.179 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.2.1.178 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.2.1.177 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.2.1.176 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.2.1.175 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.2.1.174 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.2.1.173 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.2.1.172 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.2.1.171 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.2.1.170 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.2.1.169 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.2.1.167 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.2.1.166 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.2.1.165 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.2.1.164 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.2.1.163 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.2.1.162 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.2.1.161 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.2.1.160 tracks/elixir/exercises/hexadecimal/hexadecimal.exs