%% %CopyrightBegin%
%%
%% SPDX-License-Identifier: Apache-2.0
%%
%% Copyright Ericsson AB 2021-2025. All Rights Reserved.
%%
%% %CopyrightEnd%

[;1m  split_binary(Bin, Pos)[0m

  Returns a tuple containing the binaries that are the result of
  splitting [;;4mBin[0m into two parts at position [;;4mPos[0m.

  This is not a destructive operation. After the operation, there
  are three binaries altogether.

  For example:

    > B = list_to_binary("0123456789").
    <<"0123456789">>
    > byte_size(B).
    10
    > {B1, B2} = split_binary(B,3).
    {<<"012">>,<<"3456789">>}
    > byte_size(B1).
    3
    > byte_size(B2).
    7
