The OpenD Programming Language

idup

Provide the .idup array property.

  1. immutable(T)[] idup [@property getter]
    @property
    immutable(T)[]
    idup
    (
    T
    )
    (
    T[] a
    )
  2. immutable(T)[] idup [@property getter]

Examples

char[] arr = ['a', 'b', 'c'];
string s = arr.idup;
arr[0] = '.';
assert(s == "abc");

Meta