On Thursday, 30 December 2021 at 09:34:27 UTC, eugene wrote:
```dchar[] s = cast(char[])ioCtx.buf[0 .. strlen(cast(char*)ioCtx.buf.ptr) - 1];// -1 is to eliminate terminating '\n' writefln("got '%s' from '%s:%d'", s, client.addr, client.port); ``` Is there some more concise/elegant way to do that?
Try `auto s = fromStringz(cast(char*)ioCtx.buf.ptr)`.