Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

generate random string in c

 string c = "";
 const string glyphs= "abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_-=+]}[{;:'/?.><,|`~"; //add the characters you want
 int minCharAmount = 8; //minimuim length of your string
 int maxCharAmount = 12; //maximium length of your string
 int charAmount = Random.Range(minCharAmount, maxCharAmount);
 for(int i=0; i<charAmount; i++)
 {
     c += glyphs[Random.Range(0, glyphs.Length)];
 }
 
PREVIOUS NEXT
Tagged: #generate #random #string
ADD COMMENT
Topic
Name
3+6 =