Makes a copy of the given array on newly allocated memory.
array to copy
A copy of the input array.
1 auto s1 = [0, 1, 2]; 2 auto s2 = s1.arraydup; 3 s2[0] = 4; 4 assert(s1 == [0, 1, 2]); 5 assert(s2 == [4, 1, 2]); 6 string sEmpty; 7 assert(sEmpty.arraydup is null);
See Implementation
Makes a copy of the given array on newly allocated memory.