string from C function

Mike Parker aldacron at gmail.com
Wed May 7 22:33:46 UTC 2025


On Wednesday, 7 May 2025 at 22:28:32 UTC, Dejan Lekic wrote:

>
> https://dlang.org/library/std/string/from_stringz.html
>


Given that `fromStringz` returns a slice of the original string, 
you can use `std.conv.to` to do it with an allocation when 
needed: `to!string(str)`.


More information about the Digitalmars-d-learn mailing list