This method is used to split the binary list based on the index position specified.
split_binary(binarylst,index)
binarylst − This is the binary list which needs to be split.
index − This is the index position in which the list should be split.
Returns the split binary string.
-module(helloworld). -export([start/0]). start() -> io:fwrite("~p~n",[split_binary(<<1,2,3,4,5>>,3)]).
When we run the above program we will get the following result.
{<<1,2,3>>,<<4,5>>}