string to char array?

Dennis Ritchie via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jun 2 08:26:49 PDT 2015


On Tuesday, 2 June 2015 at 15:07:58 UTC, Kyoji Klyden wrote:
> quick question: What is the most efficient way to covert a 
> string to a char array?

string s = "str";
char[] strArr = s.dup;


More information about the Digitalmars-d-learn mailing list