> Hi Jeroen,
>
> I think we're not on the same page. :) I consider both versions
> of str_rand() I posted trivial...

Agree. But they are not what rand_str could do. The result has
16 different chars, just because md5 happens to have that much.

Implementing something that has NOT that limitation, is far less trivial.
Below is a - limited - implementation

> Also, and this is strictly subjective, I don't think the function
> needs to be implemented natively. As I said, it's trivial. :) But
> my stance could be rated as -0.3... Actually, as I'm thinking about
> it, -0.2.

k, mine is 0.8, 0.9, on the idea, not the details

> as for the rand_str($len , "1..9a..f\x4F") proto:
> I don't like it. KISS.

Better suggestions? Simple length and a list of characters... and the
list-of-characters way is also in addcslashes, and the trims.

Jeroen



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to