Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion libs/estdlib/src/binary.erl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@
-module(binary).

-export([
at/2, decode_hex/1, encode_hex/1, encode_hex/2, part/3, split/2, split/3, replace/3, replace/4
at/2,
copy/1, copy/2,
decode_hex/1,
encode_hex/1, encode_hex/2,
part/3,
split/2, split/3,
replace/3, replace/4
]).

%%-----------------------------------------------------------------------------
Expand All @@ -40,6 +46,27 @@
at(_Binary, _Index) ->
erlang:nif_error(undefined).

%%-----------------------------------------------------------------------------
%% @param Binary binary to copy
%% @returns a copy of the binary
%% @doc Returns a copy of the binary.
%% @end
%%-----------------------------------------------------------------------------
-spec copy(Binary :: binary()) -> binary().
copy(_Binary) ->
erlang:nif_error(undefined).

%%-----------------------------------------------------------------------------
%% @param Binary binary to copy
%% @param N number of times to copy the binary
%% @returns a binary containing N copies of the input binary
%% @doc Returns a binary containing N copies of the input binary.
%% @end
%%-----------------------------------------------------------------------------
-spec copy(Binary :: binary(), N :: non_neg_integer()) -> binary().
copy(_Binary, _N) ->
erlang:nif_error(undefined).

%%-----------------------------------------------------------------------------
%% @param Data hex encoded binary to decode
%% @returns decoded binary
Expand Down
Loading