Calling C functions that modify a string
Steven Schveighoffer
schveiguy at gmail.com
Thu Jun 15 15:53:57 UTC 2023
On 6/15/23 10:04 AM, Jonathan M Davis wrote:
> On Thursday, June 15, 2023 7:18:06 AM MDT Steven Schveighoffer via
> Digitalmars-d-learn wrote:
>> But in general, if you want a mutable character array that's zero
>> terminated, you need to make a copy with a zero terminator, but type it
>> as mutable. I'm surprised there isn't a way to do this easily in the
>> library.
>
> https://dlang.org/phobos/std_utf.html#toUTFz
>
Oh nice, so `toUTFz!char` should work. Thanks!
-Steve
More information about the Digitalmars-d-learn
mailing list