UUID library - Interface.
More...
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <tchatator413/slice.h>
Go to the source code of this file.
|
#define | UUID4_REPR_LENGTH 36 |
| Length of the canonical representation of a version 4 UUID, excluding the null terminator.
|
|
#define | uuid4_of(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16) (uuid4_t) uuid4_init(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16) |
| Create a new version 4 UUID from the specified values.
|
|
#define | uuid4_init(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16) |
|
UUID library - Interface.
- Author
- Raphaƫl
- Date
- 23/01/2025
Definition in file uuid.h.
◆ uuid4_init
#define uuid4_init |
( |
|
x1, |
|
|
|
x2, |
|
|
|
x3, |
|
|
|
x4, |
|
|
|
x5, |
|
|
|
x6, |
|
|
|
x7, |
|
|
|
x8, |
|
|
|
x9, |
|
|
|
x10, |
|
|
|
x11, |
|
|
|
x12, |
|
|
|
x13, |
|
|
|
x14, |
|
|
|
x15, |
|
|
|
x16 |
|
) |
| |
Value: { \
.data = { \
x1, \
x2, \
x3, \
x4, \
x5, \
x6, \
x7, \
x8, \
x9, \
x10, \
x11, \
x12, \
x13, \
x14, \
x15, \
x16, \
} \
}
Definition at line 55 of file uuid.h.
56 { \
57 .data = { \
58 x1, \
59 x2, \
60 x3, \
61 x4, \
62 x5, \
63 x6, \
64 x7, \
65 x8, \
66 x9, \
67 x10, \
68 x11, \
69 x12, \
70 x13, \
71 x14, \
72 x15, \
73 x16, \
74 } \
75 }
◆ uuid4_of
#define uuid4_of |
( |
|
x1, |
|
|
|
x2, |
|
|
|
x3, |
|
|
|
x4, |
|
|
|
x5, |
|
|
|
x6, |
|
|
|
x7, |
|
|
|
x8, |
|
|
|
x9, |
|
|
|
x10, |
|
|
|
x11, |
|
|
|
x12, |
|
|
|
x13, |
|
|
|
x14, |
|
|
|
x15, |
|
|
|
x16 |
|
) |
| (uuid4_t) uuid4_init(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16) |
Create a new version 4 UUID from the specified values.
- Returns
- A new UUID Version 4.
Definition at line 52 of file uuid.h.
◆ UUID4_REPR_LENGTH
#define UUID4_REPR_LENGTH 36 |
Length of the canonical representation of a version 4 UUID, excluding the null terminator.
Definition at line 20 of file uuid.h.
◆ uuid4_eq()
Are two version 4 UUIDs equal?
- Parameters
-
a | The first UUID. |
b | The second UUID. |
- Returns
- A boolean indicating whether
a
and b
are equal.
◆ uuid4_parse()
bool uuid4_parse |
( |
uuid4_t * |
out_uuid, |
|
|
char const |
repr[static const UUID4_REPR_LENGTH] |
|
) |
| |
Parse a version 4 UUID from its canonical representation.
- Parameters
-
out_uuid | Mutated to the parsed UUID. |
repr | The string containing the representation. |
- Returns
true
parsing successful out_uuid
is set.
-
false
parsing unsucessful.
◆ uuid4_put()
void uuid4_put |
( |
uuid4_t |
uuid, |
|
|
FILE * |
stream |
|
) |
| |
Put the canonical representation of version 4 UUID.
- Parameters
-
uuid | The UUID Version 4 to write. |
stream | The stream to write to. |
◆ uuid4_repr()
char * uuid4_repr |
( |
uuid4_t |
uuid, |
|
|
char |
repr[static const UUID4_REPR_LENGTH] |
|
) |
| |
Generate the representation of a version 4 UUID.
- Parameters
-
uuid | The UUID. |
repr | The representation buffer. |
- Returns
{repr}
.