D-DLLs & Python

jerro a at a.com
Tue Feb 19 11:06:42 PST 2013


> D doesn't use null termination for it's strings, strings are 
> immutable(char)[]. You can form a D slice from a pointer by 
> going
> slice = ptr[0..length]
> where length is the length of the array the pointer represents.
> You can't just take a c style string and expect writeln to work 
> with it.

You can use std.conv.to to convert a C string to a D string.


More information about the Digitalmars-d-learn mailing list