Erlang – binary_to_list

Erlang binary_to_list

In this guide, we will discuss Erlang binary_to_list. This method is used to convert a binary value to a list.

Syntax

binary_to_list(binaryvalue)

Parameters

  • binaryvalue − This is binary value which needs to be converted to a list.

Return Value

Returns a list.

For example

-module(helloworld). 
-export([start/0]). 

start() -> 
   io:fwrite("~p~n",[binary_to_list(<<2,1>>)]).

Output

When we run the above program we will get the following result.

[2,1]

Next Topic : Click Here

This Post Has 2 Comments

Leave a Reply