Skip to content

Instantly share code, notes, and snippets.

@drfloob

drfloob/MISSING_NAME.java

Last active Oct 25, 2016
Embed
What would you like to do?
private static final char[] ALPHABET = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'0', 'a', 'b', 'c', 'd', 'e', 'f' };
private static final int LENGTH = 12;
public static String __MISSING_NAME__(final String s) {
final StringBuilder stringBuilder = new StringBuilder(s);
for (int i = 0; i < LENGTH; i++) {
stringBuilder.append(
ALPHABET[
(int) Math.floor(Math.random()
* (double) ALPHABET.length)]);
}
return stringBuilder.toString();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment