====== std.uuid ====== UUID-Generierung nach RFC 9562. Version 4 (kryptografisch zufällig, alle 122 Bits zufällig) und Version 7 (Unix-Zeitstempel-basiert in den oberen 48 Bits — sortierbar, ideal für Datenbankprimärschlüssel). Standard-String-Format: ''xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx''. Konvertierung zu/von Byte-Array und String, Vergleich, Nil-UUID (alle Bytes 0) und Auslesen von Version und Variant. Einsatzbereiche: Datenbankprimärschlüssel (UUID v7 mit natürlicher Sortierung), Sitzungs-IDs, API-Ressource-Identifier, verteilte Systeme ohne zentrale ID-Vergabe. **Autor:** Andreas Röne\\ **Copyright:** 2024-2025 Andreas Röne ---- ===== Konstanten ===== ^ Name ^ Typ ^ Wert ^ Sichtbarkeit ^ | ''UUID_SIZE'' | ''int64'' | ''16'' | pub | ---- ===== Funktionen ===== ^ Signatur ^ Sichtbarkeit ^ Beschreibung ^ | ''GenerateV4(output: pchar): bool'' | pub | Generiert UUID Version 4 (zufällig) | | ''GenerateV7(output: pchar): bool'' | pub | Generiert UUID Version 7 (zeitbasiert) | | ''ToString(uuid: pchar, output: pchar): bool'' | pub | Konvertiert UUID-Bytes in String | | ''FromString(str: pchar, output: pchar): bool'' | pub | Parst UUID-String in Byte-Array | | ''Compare(uuidA: pchar, uuidB: pchar): int64'' | pub | Vergleicht zwei UUIDs | | ''IsNil(uuid: pchar): bool'' | pub | Prüft ob UUID eine Nil-UUID ist | | ''GetVersion(uuid: pchar): int64'' | pub | Gibt UUID-Version zurück | | ''GetVariant(uuid: pchar): int64'' | pub | Gibt UUID-Variant zurück | | ''GenerateV4String(output: pchar): bool'' | pub | Generiert UUID-v4-String direkt | | ''GenerateV7String(output: pchar): bool'' | pub | Generiert UUID-v7-String direkt | | ''IsValid(str: pchar): bool'' | pub | Prüft ob UUID-String gültig ist | | ''SetNil(uuid: pchar): bool'' | pub | Setzt alle UUID-Bytes auf null |