Paste: uuid

Author: mrjbq7
Mode: factor
Date: Wed, 17 Dec 2008 17:06:42
Plain Text |
USING: alien.syntax alien.c-types byte-arrays kernel strings ;

IN: uuid

LIBRARY: uuid

FUNCTION: void uuid_generate ( char[16] out ) ;

FUNCTION: void uuid_unparse ( char[16] out, char* out ) ;

: uuid ( -- string )
    16 "char" <c-array> dup uuid_generate 
    36 <byte-array> [ uuid_unparse ] keep >string ;

New Annotation

Summary:
Author:
Mode:
Body: