Library
IDs
Utility functions for generating and managing unique identifiers.
Shared Functions
CreateUniqueId
Generates a unique identifier string, optionally avoiding collisions with existing IDs and allowing custom length or pattern.
local id = dLib.Ids.CreateUniqueId()| Argument | Type | Description |
|---|---|---|
tbl? | table | nil | Ids to check against. Must be the key to the tables value. |
len? | number | nil | Desired length of the generated ID; defaults to 8 if omitted. |
pattern? | string | nil | Custom pattern or character set to use when generating the ID. Defaults to alphanumeric. |
| Returned Data | Type | Description |
|---|---|---|
id | string | The generated unique identifier string. |