Compare commits
3 Commits
v0.0.7
...
97809cd321
| Author | SHA1 | Date | |
|---|---|---|---|
| 97809cd321 | |||
|
|
801a945991 | ||
|
|
112e6290f0 |
2
pom.xml
2
pom.xml
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>com.imyeyu.utils</groupId>
|
||||
<artifactId>timi-utils</artifactId>
|
||||
<version>0.0.7</version>
|
||||
<version>0.0.8</version>
|
||||
|
||||
<properties>
|
||||
<maven.test.skip>true</maven.test.skip>
|
||||
|
||||
@@ -15,8 +15,16 @@ import java.util.UUID;
|
||||
*/
|
||||
public class Text {
|
||||
|
||||
public static String LETTER_POOL = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
|
||||
public static String NUMBER_POOL = "0123456789";
|
||||
|
||||
public static String LETTER_NUMBER_POOL = LETTER_POOL + LETTER_POOL;
|
||||
|
||||
public static String PASSWORD_CHAR_POOL = LETTER_NUMBER_POOL + "!#$%&()*+,-./:;<=>?@[]^_`{|}~";
|
||||
|
||||
/** 十六进制小写 */
|
||||
public static char[] HEX_DIGITS_LOWER = "0123456789abcdef".toCharArray();
|
||||
public static char[] HEX_DIGITS_LOWER = (NUMBER_POOL + "abcdef").toCharArray();
|
||||
|
||||
/**
|
||||
* 是否为半角字符
|
||||
@@ -150,7 +158,7 @@ public class Text {
|
||||
}
|
||||
|
||||
public static String randomString(int length) {
|
||||
return randomString("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", length);
|
||||
return randomString(LETTER_NUMBER_POOL, length);
|
||||
}
|
||||
|
||||
public static String randomString(String pool, int length) {
|
||||
|
||||
Reference in New Issue
Block a user