Home » U++ Library support » U++ Core » Uuid formating with dashes
Uuid formating with dashes [message #25117] |
Thu, 11 February 2010 10:48  |
cbpporter
Messages: 1427 Registered: September 2007
|
Ultimate Contributor |
|
|
I need to have my Uuids formated with dashes in the standard positions.
So I added to Uuid.h as a counterpart to Format:
String UuidFormatDashes(const Uuid& id);
and Uuid.cpp:
String UuidFormatDashes(const Uuid& id) {
return Sprintf("%08X-%04X-%04X-%04X-%04X%08X", id.a, (id.b & 0xFFFF0000) >> 16, id.b & 0x0000FFFF,
(id.c & 0xFFFF0000) >> 16, id.c & 0x0000FFFF, id.d);
}
Alternatively, and even probably better this method should be part of Uuid class and drop the prefix.
[Updated on: Thu, 11 February 2010 10:48] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sat May 03 14:50:03 CEST 2025
Total time taken to generate the page: 0.02748 seconds
|