pro.mathias.lang (@Geod24) reported this on 2021-04-18T18:22:47Z
Transfered from https://issues.dlang.org/show_bug.cgi?id=21843
CC List
Description
```
import std;
void main ()
{
ubyte[] data = [42, 69, 250];
writefln("%X", data);
}
```
This currently throws an Exception. I think it could print `2A45FA`. This would be very handy to save on space when printing large ubyte arrays. This is an enhancement request, as there is nothing wrong with the current behavior.
bugzilla (@WalterBright) commented on 2021-04-19T15:52:25Z
You can use
writefln!"%(%02X%)"(data);
to get the desired result. (But %X might be useful as a shortcut, so leaving this open.)