10.07.2017, 17:31
Hi,
I'm using Ryder's random string generator and there's a slight confusion when it adds up a capital I or a lower L so I tried adjusting it in order to exclude these from the string but it didn't work:
What could be the problem? Thanks.
I'm using Ryder's random string generator and there's a slight confusion when it adds up a capital I or a lower L so I tried adjusting it in order to exclude these from the string but it didn't work:
Код:
stock randomString(strDest[], strLen = 11) { new letter[1]; while(strLen--) { letter[0] = random(2) ? (random(26) + (random(2) ? 'a' : 'A')) : (random(10) + '0'); while(!strcmp(letter[0], "I", false) || !strcmp(letter[0], "l", false)) { letter[0] = random(2) ? (random(26) + (random(2) ? 'a' : 'A')) : (random(10) + '0'); } strDest[strLen] = letter[0]; } }