import std.stdio;

void main()
{
    char[100] a = "old content";
    a = "new content";
}

The program above causes an exception to be thrown:

object.Exception@src/rt/arraycat.d(31): lengths don't match for array copy

I admit that a fixed-length char array is not really a string. But assuming that the new content is legal UTF-8, what is the best way of modifying that array?

Thank you,
Ali

Reply via email to