Answers for "generate random string given characters and length"

PHP
0

A random character from a string of characters:

String chars = "abcxyz";
Random rnd = new Random();
char c = chars.charAt(rnd.nextInt(chars.length()));
Posted by: Guest on December-19-2020

Code answers related to "generate random string given characters and length"

Browse Popular Code Answers by Language