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

[;1m  binary_part(Subject, PosLen)[0m

[;;4mSince[0m:
  OTP R14B

  Extracts the part of the binary described by [;;4mPosLen[0m.

  Negative length can be used to extract bytes at the end of a
  binary.

  For example:

    1> Bin = <<1,2,3,4,5,6,7,8,9,10>>.
    2> binary_part(Bin,{byte_size(Bin), -5}).
    <<6,7,8,9,10>>

  Failure: [;;4mbadarg[0m if [;;4mPosLen[0m in any way references outside the
  binary.

  [;;4mStart[0m is zero-based, that is:

    1> Bin = <<1,2,3>>
    2> binary_part(Bin,{0,2}).
    <<1,2>>

  For details about the [;;4mPosLen[0m semantics, see [;;4mbinary[0m.

[;1m  binary_part(Subject, Start, Length)[0m

[;;4mSince[0m:
  OTP R14B

  There is no documentation for binary_part(Subject, {Start,
  Length})
