Explorar el Código

ft:函数添加

master
SisMaker hace 4 años
padre
commit
4b4c96d3cb
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. +5
    -0
      src/uuid/utUuid.erl

+ 5
- 0
src/uuid/utUuid.erl Ver fichero

@ -4,6 +4,7 @@
randStr/1 %%
, uuid/0 %% UUID
, uuidHex/0 %% hex格式的唯一UUID
, uuidHexBin/0
]).
-spec randStr(integer()) -> string().
@ -28,3 +29,7 @@ uuid() ->
-spec uuidHex() -> binary().
uuidHex() ->
utMd5:getMd5Hex(term_to_binary({erlang:system_time(nanosecond), rand:uniform(134217727), make_ref()})).
-spec uuidHexBin() -> binary().
uuidHexBin() ->
utMd5:getMd5HexBin(term_to_binary({erlang:system_time(nanosecond), rand:uniform(134217727), make_ref()})).

Cargando…
Cancelar
Guardar