Skip over navigation

Array Utilities Unit

Code that operates on generic arrays

Version 0.1.0
Released 2025-05-30
Platforms Win32 & Win64
Framework RTL
Compatibilty Delphi XE & later

Overview

This unit, named DelphiDabbler.Lib.ArrayUtils.pas, provides a single Delphi Pascal "Advanced" record, TArrayUtils, that provides operations upon and information about generic arrays.

Testing

DUnit tests for TArrayUtils are included in the download.

Example Code

Each method of TArrayUtils has example code included in the method's online documentation. The same example code is included in the download.

Get The Code

You can download the latest version of the Array Utilities Unit from GitHub as dd-arrayutils-0.1.0.zip.

Download v0.1.0

The Array Utilities Unit source code is hosted in the ddablib/arrayutils GitHub repository. You can git clone or fork the repository as required.

Installation

The Array Utilities Unit is supplied in a zip file. Before installing you need to extract all the files from the zip file, preserving the directory structure. The following files will be extracted:

  • DelphiDabbler.Lib.ArrayUtils.pas – source code.
  • README.md – read-me file.
  • CHANGELOG.md – project change log.
  • MPL-2.txt – the Mozilla Public License v2.0.
  • Documentation.URL – short-cut to the class' online documentation.

In addition to the above files you will find the DUnit tests for DelphiDabbler.Lib.ArrayUtils.pas in the Test sub-directory and the example code in the Demos directory.

There are four possible ways to use the unit.

  1. The simplest way is to add DelphiDabbler.Lib.ArrayUtils.pas to your projects as you need it.
  2. To make the unit easier to re-use you can either copy it to a folder on your Delphi search path, or add the folder where you extracted the unit to the search path. You then simply use the unit as required without needing to add it to your project.
  3. For maximum portability you can add the unit to a Delphi design time package. If you need help doing this see here.
  4. If you use Git you can add the ddablib/arrayutils GitHub repository as a Git submodule and add it to your project. Obviously, it's safer if you fork the repo and use your copy, just in case ddablib/arrayutils ever goes away.

Documentation

The Array Utilities Unit is comprehensively documented online here

Read-me file: README.md

Change log: CHANGELOG.md.

Feedback & Queries

If you find any bugs or want to suggest a new feature please use the Array Utilities Unit issue tracker.

If you have created a bug fix or have implemented a new feature please open a pull request for it.

Should you have any queries about using the unit please read the documentation. If you can't find an answer in the documentation then post a message in the discussion group.

License

The Array Utilities Unit is open source. It is copyright © 2025 by Peter Johnson. The source code is made available under the terms of the Mozilla Public License v2.0. All relevant trademarks are acknowledged.