Random text string?
#6

Quote:
Originally Posted by WoodPecker
View Post
And why you want to use the random string or whatever you call it?
I'm not discussing my project ideas.

Quote:
Originally Posted by RyDeR`
View Post
pawn Code:
stock randomString(strDest[], strLen = 10)
{
    while(strLen--)
        strDest[strLen] = random(2) ? (random(26) + (random(2) ? 'a' : 'A')) : (random(10) + '0');
}
Example:
pawn Code:
new
    string[10]
;
randomString(string, 10);
Thanks, that's just what i was looking for!

ffs, "You have given out too much Reputation in the last 24 hours, try again later."
Reply


Messages In This Thread
Random text string? - by linuxthefish - 15.08.2011, 18:37
Re: Random text string? - by WoodPecker - 15.08.2011, 18:39
Re: Random text string? - by linuxthefish - 15.08.2011, 18:41
Re: Random text string? - by WoodPecker - 15.08.2011, 18:57
Re: Random text string? - by RyDeR` - 15.08.2011, 19:06
Re: Random text string? - by linuxthefish - 15.08.2011, 19:08
Re: Random text string? - by Scenario - 15.08.2011, 19:19
Re: Random text string? - by Jefff - 15.08.2011, 19:27
Re: Random text string? - by RyDeR` - 15.08.2011, 20:39
Re: Random text string? - by MadeMan - 16.08.2011, 19:08

Forum Jump:


Users browsing this thread: 1 Guest(s)