String conversion functions in Phobos

Jonathan M Davis jmdavisProg at gmx.com
Tue Aug 2 03:07:43 PDT 2011


On Tuesday 02 August 2011 12:02:07 simendsjo wrote:
> I want to convert SomeChar[] or SomeChar* into
> PerhapsAnotherCharNullTerminated*, but std.conv doesn't work like this.
> char[] a = "ao";
> to!(wchar*)(a); // fails
> 
> toUTF16z converts char[] to wchar*
> toStringz converts char[] to char*
> 
> Am I missing function(s), or do I have to combine them myself?

The github version has std.utf.toUTFz, but it obviously won't be in an actual 
release until the next release.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list