What's D's way to do that? I need it to be mutable array of wchar because a Windows function requires that. Alternative to go down to using pointers, which would be something like: wchar[] w = new wchar[s.length]; memcpy(w.ptr, s.ptr, s.length);