Mac.from_string

You're seeing just the function from_string, go back to Mac module for more information.

Specs

from_string(String.t()) :: {:ok, t()} | {:error, term()}

converts a mac address string and turns it into a proper mac address datatype. Supports standard colon format, BMC hyphen format, and arista/cisco switch dot format.

iex> Mac.from_string!("06:AA:07:FB:B6:1E")
{0x06, 0xAA, 0x07, 0xFB, 0xB6, 0x1E}

iex> Mac.from_string!("06:aa:07:fb:b6:1e")
{0x06, 0xAA, 0x07, 0xFB, 0xB6, 0x1E}

iex> Mac.from_string!("06-AA-07-FB-B6-1E")
{0x06, 0xAA, 0x07, 0xFB, 0xB6, 0x1E}

iex> Mac.from_string!("06aa.07fb.b61e")
{0x06, 0xAA, 0x07, 0xFB, 0xB6, 0x1E}