Using libraries can trigger hidden allocations.
ok. fine. no unnecessary, hidden allocations then. // ------------------ module test; import core.stdc.stdio : putchar; nothrow @nogc void main() { string str = "abc;def;ab"; ulong len = str.length; for (ulong i = 0; i < len; i++) { if (cast(int) str[i] != ';') putchar(cast(int) str[i]); } } // ------------------