类 RandomStringUtils
java.lang.Object
spring.turbo.util.RandomStringUtils
随机字符串生成工具
- 从以下版本开始:
- 1.0.0
- 作者:
- 应卓
- 另请参阅:
-
方法概要
修饰符和类型方法说明static Stringrandom(int count) 生成随机字符串static Stringrandom(int count, boolean letters, boolean numbers) 生成随机字符串static Stringrandom(int count, char... chars) 生成随机字符串static Stringrandom(int count, int start, int end, boolean letters, boolean numbers) 生成随机字符串static String生成随机字符串static StringrandomAlphabetic(int count) 生成随机字符串 (只包含字母)static StringrandomAlphabetic(int minLengthInclusive, int maxLengthExclusive) 生成随机字符串 (只包含字母)static StringrandomAlphanumeric(int count) 生成随机字符串 (只包含字母和数字)static StringrandomAlphanumeric(int minLengthInclusive, int maxLengthExclusive) 生成随机字符串 (只包含字母和数字)static StringrandomAscii(int count) 生成随机字符串 (只包含ascii)static StringrandomAscii(int minLengthInclusive, int maxLengthExclusive) 生成随机字符串 (只包含ascii)static StringrandomGraph(int count) 生成随机字符串 (只包含图形支付)static StringrandomGraph(int minLengthInclusive, int maxLengthExclusive) 生成随机字符串 (只包含图形支付)static StringrandomNumeric(int count) 生成随机字符串 (只包含数字)static StringrandomNumeric(int minLengthInclusive, int maxLengthExclusive) 生成随机字符串 (只包含数字)static StringrandomPrint(int count) 生成随机字符串 (只包含可显示字符)static StringrandomPrint(int minLengthInclusive, int maxLengthExclusive) 生成随机字符串 (只包含可显示字符)static String生成随机UUID字符串static StringrandomUUID(boolean removeHyphen) 生成随机UUID字符串
-
方法详细资料
-
random
生成随机字符串- 参数:
count- 字符串长度- 返回:
- 随机字符串
-
randomAscii
生成随机字符串 (只包含ascii)- 参数:
count- 字符串长度- 返回:
- 随机字符串
-
randomAscii
生成随机字符串 (只包含ascii)- 参数:
minLengthInclusive- 可能的长度最小值 (包含)maxLengthExclusive- 可能的长度最大值 (不包含)- 返回:
- 随机字符串
-
randomAlphabetic
生成随机字符串 (只包含字母)- 参数:
count- 字符串长度- 返回:
- 随机字符串
-
randomAlphabetic
生成随机字符串 (只包含字母)- 参数:
minLengthInclusive- 可能的长度最小值 (包含)maxLengthExclusive- 可能的长度最大值 (不包含)- 返回:
- 随机字符串
-
randomAlphanumeric
生成随机字符串 (只包含字母和数字)- 参数:
count- 字符串长度- 返回:
- 随机字符串
-
randomAlphanumeric
生成随机字符串 (只包含字母和数字)- 参数:
minLengthInclusive- 可能的长度最小值 (包含)maxLengthExclusive- 可能的长度最大值 (不包含)- 返回:
- 随机字符串
-
randomGraph
生成随机字符串 (只包含图形支付)- 参数:
count- 字符串长度- 返回:
- 随机字符串
-
randomGraph
生成随机字符串 (只包含图形支付)- 参数:
minLengthInclusive- 可能的长度最小值 (包含)maxLengthExclusive- 可能的长度最大值 (不包含)- 返回:
- 随机字符串
-
randomNumeric
生成随机字符串 (只包含数字)- 参数:
count- 字符串长度- 返回:
- 随机字符串
-
randomNumeric
生成随机字符串 (只包含数字)- 参数:
minLengthInclusive- 可能的长度最小值 (包含)maxLengthExclusive- 可能的长度最大值 (不包含)- 返回:
- 随机字符串
-
randomPrint
生成随机字符串 (只包含可显示字符)- 参数:
count- 字符串长度- 返回:
- 随机字符串
-
randomPrint
生成随机字符串 (只包含可显示字符)- 参数:
minLengthInclusive- 可能的长度最小值 (包含)maxLengthExclusive- 可能的长度最大值 (不包含)- 返回:
- 随机字符串
-
random
生成随机字符串- 参数:
count- 字符串长度letters- 是否可包含字母numbers- 是否可包含数字- 返回:
- 随机字符串
-
random
生成随机字符串- 参数:
count- 字符串长度start- 开始字符end- 结束字符letters- 是否可包含字母numbers- 是否可包含数字- 返回:
- 随机字符串
-
random
生成随机字符串- 参数:
count- 随机字符串长度chars- 随机字符串的可能的字符从此参数中获得- 返回:
- 随机字符串
-
random
生成随机字符串- 参数:
count- 随机字符串长度chars- 随机字符串的可能的字符从此参数中获得- 返回:
- 随机字符串
-
randomUUID
生成随机UUID字符串- 返回:
- 随机UUID字符串
-
randomUUID
生成随机UUID字符串- 参数:
removeHyphen- 结果中是否要移除字符"-"- 返回:
- 随机UUID字符串
-