This method is used to convert an atom to a binary value.
atom − The atom which needs to be converted to a binary value.
A binary value based on the atom value.
-module(helloworld). -export([start/0]). start() -> io:fwrite("~p~n",[atom_to_binary('Erlang', utf8)]).
The output of the above program will be as follows.