How to handle char* to string from C functions?

bearophile bearophileHUGS at lycos.com
Thu Jan 2 07:31:24 PST 2014


Gary Willoughby:

> Another question: how do i convert const(char)** to string[]?

If you know that you have N strings, then a solution is 
(untested):

pp[0 .. N].map!text.array

If it doesn't work, try:

pp[0 .. N].map!(to!string).array

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list