From 49175955350dfdd749b848b26051fee065dbc034 Mon Sep 17 00:00:00 2001 From: MechSlayer <0jcrespo1996@gmail.com> Date: Thu, 11 Sep 2025 04:41:51 +0200 Subject: [PATCH] feature: add UUID type and related functions for UUID generation and conversion --- Source/DrangPlatform/Include/drang/uuid.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Source/DrangPlatform/Include/drang/uuid.h diff --git a/Source/DrangPlatform/Include/drang/uuid.h b/Source/DrangPlatform/Include/drang/uuid.h new file mode 100644 index 0000000..d9152db --- /dev/null +++ b/Source/DrangPlatform/Include/drang/uuid.h @@ -0,0 +1,20 @@ +#pragma once +#include "platform.h" +#include +#include + +DRANG_BEGIN_DECLS + +typedef struct drang_uuid +{ + uint64_t high; + uint64_t low; +} drang_uuid_t; + + + +DRANG_PLATFORM_API int drang_uuid_generate(drang_uuid_t* out_uuid); +DRANG_PLATFORM_API int drang_uuid_to_string(const drang_uuid_t* uuid, char* out_str, size_t str_size); +DRANG_PLATFORM_API int drang_uuid_from_string(const char* str, size_t str_size, drang_uuid_t* out_uuid); + +DRANG_END_DECLS