Sha256: aa27a65fd5ae97c257177805a54c839f1b37b7cd84ae4ee254bddece0e3fb5e0

Contents?: true

Size: 467 Bytes

Versions: 327

Compression:

Stored size: 467 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

327 entries across 327 versions & 1 rubygems

Version Path
trackler-2.0.5.10 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.0.5.9 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.0.5.8 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.0.5.7 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.0.5.6 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.0.5.5 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.0.5.4 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.0.5.3 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.0.5.2 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.0.5.1 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.0.5.0 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.0.4.0 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.0.3.9 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.0.3.8 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.0.3.7 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.0.3.6 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.0.3.5 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.0.3.4 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.0.3.3 tracks/elixir/exercises/hexadecimal/hexadecimal.exs
trackler-2.0.3.2 tracks/elixir/exercises/hexadecimal/hexadecimal.exs