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