Catalog · How the catalog works
VSoft.Ulid
Universally Unique Lexicographically Sortable Identifier
- ★ 18 on GitHub
Anyone may press Interesting, signed in or not. It helps others find this project.
README
VSoft.Ulid
A Delphi Implementation of ULID for Delphi XE2 or later.
- 128-bit compatibility with UUID
- Lexicographically sortable!
- Canonically encoded as a 26 character string, as opposed to the 36 character UUID
- Uses Crockford's base32 for better efficiency and readability (5 bits per character)
- Case insensitive
- No special characters (URL safe)
- Monotonic sort order (correctly detects and handles the same millisecond)
Installation
DPM
Install VSoft.Ulid in the DPM IDE plugin, or
dpm install VSoft.Ulid .\yourproject.dprojManually
Clone the repository and add the VSoft.Ulid.pas file to your project, or add the repo\Source folder to your project's search path.
Usage
var
ulid : TUlid;
s : string;
begin
ulid := TUlid.Create;
s := ulid.ToString;
.....
ulid := TUlid.Parse('01J4H739Z46PZEFF5F6X5Q338Z');
writeln(ulid.ToString);
end;
