Last active
October 25, 2016 17:45
-
-
Save drfloob/634cf12244a10df11bc31aeed65e18f6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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