Random string samples & unicode - Reprise
bearophile
bearophileHUGS at lycos.com
Sun Sep 12 18:13:47 PDT 2010
Jonathan M Davis:
> You do seem to try to do a lot of things that most other folks never even think
> of doing, let alone have a need to. This is one of them.
Choosing few random chars out of a sequence of possible chars is very normal in Python, it's even a common thing.
> I've found that if you want a string out of array(), what you need to do is
> to!string(array(...))).
I see.
> if you're trying to grab random characters from
> a string, that's likely to work best with a dstring because it supports random
> access, so there's a decent chance that dstring is really what you want anyway,
This may be right. But as I have tried to explain two times, you may end up having string-processing code made mostly of dstrings.
Bye,
bearophile
More information about the Digitalmars-d
mailing list