On Tuesday, 24 July 2012 at 22:38:07 UTC, Era Scarecrow wrote:
[code]
//remember, java
String toGuid(byte input[16]) {
String ID = "{";
if (Integer.toHexString(input[5]).length < 2)
ID = ID + "0";
ID = ID + Integer.toHexString(input[5]);
if (Integer.toHexString(input[6]).length < 2)
ID = ID + "0";
ID = ID + Integer.toHexString(input[6]);
//repeat for other 14 bytes, plus adding dashes and ending brace
return ID;
}
[/code]
I just died a little inside...
If not for Andrei's little joke, I don't know what I might have
done.
Erm, so that I'm not completely off-topic: I know where D has
truly gone wrong. There's just too many damn semi-colons!