toChars buffer access?

Steven Schveighoffer schveiguy at gmail.com
Fri Jun 10 21:17:47 UTC 2022


On 6/10/22 5:05 PM, Salih Dincer wrote:
> On Friday, 10 June 2022 at 14:49:51 UTC, Steven Schveighoffer wrote:
>>   // option 2 (if the point is just to print)
>>   writefln("%-(%02X-%)", str);
>> ```
> 
> Delicious!
> 
> ```d
>    auto str = "Hello World!";
> 
>    import std.format, std.range : split;
>    auto strArr = str.format!"%-(%02X %)".split;

This allocates ;)

-Steve


More information about the Digitalmars-d mailing list