Selaa lähdekoodia

ft:函数添加

master
SisMaker 4 vuotta sitten
vanhempi
commit
4b4c96d3cb
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  1. +5
    -0
      src/uuid/utUuid.erl

+ 5
- 0
src/uuid/utUuid.erl Näytä tiedosto

@ -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()})).

Ladataan…
Peruuta
Tallenna