print ubyte[] as (ascii) string

Jack Applegame japplegame at gmail.com
Sat Jan 1 09:34:10 UTC 2022


On Thursday, 30 December 2021 at 18:07:15 UTC, eugene wrote:
> On Thursday, 30 December 2021 at 17:52:20 UTC, eugene wrote:
> much better than my initial

You can also write
```d
auto s = cast(string)b; // or cast(string)(b)
```
instead of
```d
char[] s = cast(char[])b[0 .. $];
```



More information about the Digitalmars-d-learn mailing list