Andrey Khropov wrote: > Why is it so? What could be done? The implementation of std.string.atoi is: long atoi(char[] s) { return std.c.stdlib.atoi(toStringz(s)); } In other words, it's the allocation/copy done by toStringz.