Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/diyhi/bbs
/ digits
Method
digits
src/main/java/cms/utils/UUIDUtil.java:60–64 ·
view source on GitHub ↗
(long val, int digits)
Source
from the content-addressed store, hash-verified
58
59
60
private
static
String digits(long val,
int
digits) {
61
long hi = 1L << (digits * 4);
62
return
toHex(hi | (val & (hi - 1)), MAX_RADIX)
63
.substring(1);
64
}
65
66
/**
67
* 将长整型数值转换为指定的进制数(最大支持62进制,字母数字已经用尽)
Callers
1
getUUID22
Method · 0.95
Calls
1
toHex
Method · 0.95
Tested by
no test coverage detected