It is possible to do that if you set the `strlitFlag` flag. I've recently discovered the same trick, strange how these things work...
- creating nimstring using pre-allocated buffer to prevent copy alireza
- creating nimstring using pre-allocated buffer to prevent copy Araq