ids(Representation,Bytes) — Logtalk 3.100.1

object

# `ids(Representation,Bytes)`

- `Representation` - Text representation for the identifier. Possible values are `atom`, `chars`, and `codes`.

- `Bytes` - Number of bytes of randomness.

Generator of random identifiers.

Availability:
`logtalk_load(ids(loader))`
Author: Paulo Moura
Version: 1:1:0
Date: 2026-02-26
Compilation flags:
`static, context_switching_calls`
Uses:
base64
fast_random
list
os
Remarks:
(none)
Inherited public predicates:
(none)

## Public predicates

### `generate/1`

Generate a random identifier.

Compilation flags:
`static`
Template:
`generate(Identifier)`
Mode and number of proofs:
`generate(--textids)` - `one`

## Protected predicates

(no local declarations; see entity ancestors if any)

## Private predicates

(no local declarations; see entity ancestors if any)

## Operators

(none)

See also

ids, nanoid(Representation,Size,Alphabet), cuid2(Representation,Size,Alphabet), ksuid(Representation,Alphabet), uuid(Representation), snowflakeid(Representation,EpochMilliseconds,TimeUnitMilliseconds,TimestampBits,NodeBits,SequenceBits,Node), ulid(Representation)