MCPcopy Create free account
hub / github.com/Hello-hao/Tbed / getShortUuid

Method getShortUuid

src/main/java/cn/hellohao/utils/SetText.java:35–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33 "U", "V", "W", "X", "Y", "Z" };
34
35 public static String getShortUuid() {
36 StringBuffer shortBuffer = new StringBuffer();
37 String uuid = UUID.randomUUID().toString().replace("-", "");
38 for (int i = 0; i < 8; i++) {
39 String str = uuid.substring(i * 4, i * 4 + 4);
40 int x = Integer.parseInt(str, 16);
41 shortBuffer.append(chars[x % 0x3E]);
42 }
43 return shortBuffer.toString();
44 }
45
46 public static String get32UUID() {
47 String uuid = UUID.randomUUID().toString().trim().replaceAll("-", "");

Callers 3

uploadForLocMethod · 0.95
uploadForURLMethod · 0.95
uploadImgMethod · 0.95

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected