Class TOlfRandomIDGenerator

Unit

Declaration

type TOlfRandomIDGenerator = class(TObject)

Description

Hierarchy

Overview

Methods

Public class function getID(Const Base: Byte; Const ASize: cardinal = 0): string;
Public class function getIDBase2(Const Size: cardinal = 0): string;
Public class function getIDBase10(Const Size: cardinal = 0): string;
Public class function getIDBase36(Const Size: cardinal = 0): string;
Public class function getIDBase62(Const Size: cardinal = 0): string;
Public class procedure SetDefaultSize(Const Size: cardinal);

Description

Methods

Public class function getID(Const Base: Byte; Const ASize: cardinal = 0): string;

( Generate a string composed by a random list of chars (0..9 -> numbers, 0..35 -> numbers + lowercased letters ('a'-'z'), 0 ..61 -> numbers and letters ('a'-'z' and 'A'-'Z') )

Public class function getIDBase2(Const Size: cardinal = 0): string;

Generate a string with random numbers between '0' and '1'

Public class function getIDBase10(Const Size: cardinal = 0): string;

Generate a string with random numbers between '0' and '9'

Public class function getIDBase36(Const Size: cardinal = 0): string;

Generate a string with random numbers between '0' and '9' or letters between 'a' and 'z'

Public class function getIDBase62(Const Size: cardinal = 0): string;

Generate a string with random numbers between '0' and '9' or letters between 'a' and 'z' or 'A' and 'Z'

Public class procedure SetDefaultSize(Const Size: cardinal);

Set the default size used by other methods of this class when no size is given when generating an ID.

My libraries for Delphi (c) 1990-2025 Patrick PREMARTIN - Powered by PasDoc
Generated by PasDoc 0.16.0.