This is a new site that's currently running on alpha code. There are going to be bugs. If you discover any, please report them on the site's issues page (GitHub account required). Thanks.
Warning: Many URLs are going to change. Refer to the README file to discover which library project's documentation has been completed.
Project: Array Utilities Unit
Unit: DelphiDabbler.Lib.ArrayUtils
Record: TArrayUtils
Applies to: ~>0.1
class function First<T>(const A: array of T): T;
static;
Returns the first element of a non-empty array.
Parameters:
Returns:
Precondition:
procedure First_Eg;
var
A: TArray<Integer>;
begin
A := TArray<Integer>.Create(1, 2, 3);
Assert(TArrayUtils.First<Integer>(A) = 1);
end;