toChars buffer access?

Salih Dincer salihdb at hotmail.com
Fri Jun 10 21:05:07 UTC 2022


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;

   import std.stdio;
   strArr.writefln!"%-(%s-%)";
```

SDB at 79


More information about the Digitalmars-d mailing list