add spotify feature
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 1m10s
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 1m10s
This commit is contained in:
20
src/main/java/cc/fascinated/bat/common/StringUtils.java
Normal file
20
src/main/java/cc/fascinated/bat/common/StringUtils.java
Normal file
@ -0,0 +1,20 @@
|
||||
package cc.fascinated.bat.common;
|
||||
|
||||
/**
|
||||
* @author Fascinated (fascinated7)
|
||||
*/
|
||||
public class StringUtils {
|
||||
/**
|
||||
* Generates a random string
|
||||
*
|
||||
* @param length the length of the string
|
||||
* @return the random string
|
||||
*/
|
||||
public static String randomString(int length) {
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
for (int i = 0; i < length; i++) {
|
||||
stringBuilder.append((char) (Math.random() * 26 + 'a'));
|
||||
}
|
||||
return stringBuilder.toString();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user