Created
July 28, 2012 08:05
-
-
Save eagleon/3192374 to your computer and use it in GitHub Desktop.
commons-lang3-3.1.jar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RandomStringUtils.random(5);//产生5位长度的随机字符串 | |
//使用指定的字符生成5位长度的随机字符串 | |
RandomStringUtils.random(5, new char[]{'a','b','c','d','e','f'}); | |
//生成指定长度的字母和数字的随机组合字符串 | |
RandomStringUtils.randomAlphanumeric(5); | |
//生成随机数字字符串 | |
RandomStringUtils.randomNumeric(5); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment