char[] to string

bearophile bearophileHUGS at lycos.com
Sat Jun 11 15:51:02 PDT 2011


Jonathan M Davis:

> it's generally best to use dup and idup only when you 
> definitely want to make a copy. By using them, you're explicitly stating that 
> you _want_ a copy to be made. If you just want a conversion, then to!() will 
> do the trick in what is hopefully the most efficient way possible.

Thank you for the answer. I think this comment needs to go in the online docs (if it's not already present).

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list