Skip to content

Commit a013f86

Browse files
committed
Merge branch 'release/0.1.0'
Release v0.1.0
2 parents 6958d73 + e65be21 commit a013f86

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+15581
-0
lines changed

.gitignore

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# .gitignore file based on
2+
# https://github.com/github/gitignore/blob/main/Delphi.gitignore
3+
# License: CC0
4+
5+
# ----------------------------------
6+
# Delphi compiler-generated binaries
7+
# ----------------------------------
8+
9+
*.exe
10+
*.dll
11+
*.bpl
12+
*.bpi
13+
*.dcp
14+
*.so
15+
*.apk
16+
*.drc
17+
*.map
18+
*.dres
19+
*.rsm
20+
*.tds
21+
*.dcu
22+
*.lib
23+
*.a
24+
*.o
25+
*.ocx
26+
*.res
27+
*.tlb
28+
*.obj
29+
30+
# --------------------------------------------
31+
# Delphi autogenerated files (duplicated info)
32+
# --------------------------------------------
33+
34+
*.cfg
35+
*.hpp
36+
#Resource.rc
37+
38+
# ----------------------------------------------
39+
# Delphi designer / tools files (not being used)
40+
# ----------------------------------------------
41+
42+
# diagram portfolio file
43+
*.dpp
44+
45+
# visual live bindings
46+
*.vlb
47+
48+
# deployment manager
49+
*.deployproj
50+
51+
# ---------------------------------------
52+
# Delphi local files (user-specific info)
53+
# ---------------------------------------
54+
55+
*.local
56+
*.identcache
57+
*.projdata
58+
*.tvsconfig
59+
*.dsk
60+
61+
# --------------------------
62+
# Delphi history and backups
63+
# --------------------------
64+
65+
__history/
66+
__recovery/
67+
*.~*
68+
69+
# ----------------
70+
# Project specific
71+
# ----------------
72+
73+
dunit.ini
74+
_release/

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Change Log for Array Utilities unit
2+
3+
## v0.1.0 of 30 May 2025
4+
5+
+ Initial release for Delphi XE and later.

DelphiDabbler.Lib.ArrayUtils.pas

Lines changed: 3079 additions & 0 deletions
Large diffs are not rendered by default.

Demos/ArrayUtilsDemo.dpr

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
{
2+
* Demo project for the DelphiDabbler.Lib.ArrayUtils unit.
3+
*
4+
* Contains copies the example code of all TArrayUtils methods included in the
5+
* documentation at https://delphidabbler.com/url/arrayutils-docs.
6+
*
7+
* This is a console application.
8+
*
9+
* Any copyright in this file is dedicated to the Public Domain.
10+
* http://creativecommons.org/publicdomain/zero/1.0/
11+
}
12+
13+
program ArrayUtilsDemo;
14+
15+
{$APPTYPE CONSOLE}
16+
17+
uses
18+
SysUtils,
19+
DelphiDabbler.Lib.ArrayUtils in '..\DelphiDabbler.Lib.ArrayUtils.pas',
20+
Registrar in 'Registrar.pas',
21+
Chop in 'Examples\Chop.pas',
22+
Compare in 'Examples\Compare.pas',
23+
Concat in 'Examples\Concat.pas',
24+
Contains in 'Examples\Contains.pas',
25+
Copy in 'Examples\Copy.pas',
26+
CopyReversed in 'Examples\CopyReversed.pas',
27+
CopySorted in 'Examples\CopySorted.pas',
28+
DeDup in 'Examples\DeDup.pas',
29+
Delete in 'Examples\Delete.pas',
30+
DeleteAndFree in 'Examples\DeleteAndFree.pas',
31+
DeleteAndFreeRange in 'Examples\DeleteAndFreeRange.pas',
32+
DeleteAndRelease in 'Examples\DeleteAndRelease.pas',
33+
DeleteAndReleaseRange in 'Examples\DeleteAndReleaseRange.pas',
34+
DeleteRange in 'Examples\DeleteRange.pas',
35+
Equal in 'Examples\Equal.pas',
36+
EqualStart in 'Examples\EqualStart.pas',
37+
Every in 'Examples\Every.pas',
38+
FindAll in 'Examples\FindAll.pas',
39+
FindAllIndices in 'Examples\FindAllIndices.pas',
40+
FindDef in 'Examples\FindDef.pas',
41+
FindIndex in 'Examples\FindIndex.pas',
42+
FindLastDef in 'Examples\FindLastDef.pas',
43+
FindLastIndex in 'Examples\FindLastIndex.pas',
44+
First in 'Examples\First.pas',
45+
ForEach in 'Examples\ForEach.pas',
46+
IndexOf in 'Examples\IndexOf.pas',
47+
IndicesOf in 'Examples\IndicesOf.pas',
48+
Insert in 'Examples\Insert.pas',
49+
Last in 'Examples\Last.pas',
50+
LastIndexOf in 'Examples\LastIndexOf.pas',
51+
Max in 'Examples\Max.pas',
52+
Min in 'Examples\Min.pas',
53+
MinMax in 'Examples\MinMax.pas',
54+
OccurrencesOf in 'Examples\OccurrencesOf.pas',
55+
Pick in 'Examples\Pick.pas',
56+
Pop in 'Examples\Pop.pas',
57+
PopAndFree in 'Examples\PopAndFree.pas',
58+
PopAndRelease in 'Examples\PopAndRelease.pas',
59+
Push in 'Examples\Push.pas',
60+
Reduce in 'Examples\Reduce.pas',
61+
Reverse in 'Examples\Reverse.pas',
62+
Shift in 'Examples\Shift.pas',
63+
ShiftAndFree in 'Examples\ShiftAndFree.pas',
64+
ShiftAndRelease in 'Examples\ShiftAndRelease.pas',
65+
Slice in 'Examples\Slice.pas',
66+
Some in 'Examples\Some.pas',
67+
Sort in 'Examples\Sort.pas',
68+
Transform in 'Examples\Transform.pas',
69+
TryFind in 'Examples\TryFind.pas',
70+
TryFindLast in 'Examples\TryFindLast.pas',
71+
UnShift in 'Examples\UnShift.pas';
72+
73+
var
74+
MethodName: string;
75+
MethodTitle: string;
76+
ProcInfo: TProcedureInfo;
77+
ProcTitle: string;
78+
79+
begin
80+
ReportMemoryLeaksOnShutdown := True;
81+
try
82+
for MethodName in TRegistrar.MethodNames do
83+
begin
84+
MethodTitle := 'TArrayUtils.' + MethodName;
85+
Writeln(MethodTitle);
86+
Writeln(StringOfChar('=', Length(MethodTitle)));
87+
Writeln;
88+
for ProcInfo in TRegistrar.GetProcs(MethodName) do
89+
begin
90+
ProcTitle := 'Running ' + ProcInfo.Name;
91+
Writeln(ProcTitle);
92+
Writeln(StringOfChar('-', Length(ProcTitle)));
93+
Writeln;
94+
// Call procedure
95+
ProcInfo.Proc;
96+
Writeln('DONE');
97+
Writeln;
98+
end;
99+
end;
100+
except
101+
on E: Exception do
102+
Writeln(E.ClassName, ': ', E.Message);
103+
end;
104+
Writeln;
105+
Writeln('END OF DEMO: press enter to exit');
106+
Readln;
107+
end.

0 commit comments

Comments
 (0)