type conversions

WhatMeWorry kc_heaser at yahoo.com
Sun Apr 29 16:42:38 PDT 2012


I'm trying to get my head around D's type conversion. What is the
best way to convert a string to a char array? Or I should say is
this the best way?

string s = "Hello There";
char[] c;

c = string.dup;


Also, what is the best way to explicitly convert a string to an
int?  I've been looking at Library Reference (Phobos) but I'm
stuck.




More information about the Digitalmars-d-learn mailing list