Base.decode16-exclamation-mark

You're seeing just the function decode16-exclamation-mark, go back to Base module for more information.
Link to this function

decode16!(string, opts \\ [])

View Source

Specs

decode16!(binary(), keyword()) :: binary()

Decodes a base 16 encoded string into a binary string.

Options

The accepted options are:

  • :case - specifies the character case to accept when decoding

The values for :case can be:

  • :upper - only allows upper case characters (default)
  • :lower - only allows lower case characters
  • :mixed - allows mixed case characters

An ArgumentError exception is raised if the padding is incorrect or a non-alphabet character is present in the string.

Examples

iex> Base.decode16!("666F6F626172")
"foobar"

iex> Base.decode16!("666f6f626172", case: :lower)
"foobar"

iex> Base.decode16!("666f6F626172", case: :mixed)
"foobar"