Ali: > a["one".length .. $] = '\0';
Is DMD able to optimize that string literal away? (Some assembly may be required). > // copy(a, "new content"); > // fill(a, "new content"); > // insertInPlace(a, "new content"); > // > // Those do not work with errors similar to this: > // > // Error: template std.algorithm.copy(Range1,Range2) if > // (isInputRange!(Range1) && > // isOutputRange!(Range2,ElementType!(Range1))) does not match any > // function template declaration Try harder. Try to slice that a. Bye, bearophile
