array

fnForeachType!Range[] array(Range)(Range r) if (isIterable!Range && !isAutodecodableString!Range && !isInfinite!Range)

Allocates an array and initializes it with copies of the elements of range r.

Narrow strings are handled as follows:

  • If autodecoding is turned on (default), then they are handled as a separate overload.
  • If autodecoding is turned off, then this is equivalent to duplicating the array.

Parameters

rrange (or aggregate with opApply function) whose elements are copied into the allocated array

Returns

allocated and initialized array
fnForeachType!(typeof((* Range).init))[] array(Range)(Range r) if (is(Range == U *, U) && isIterable!U && !isAutodecodableString!Range && !isInfinite!Range)

ditto

fnCopyTypeQualifiers!(ElementType!String, dchar)[] array(String)(scope String str) if (isAutodecodableString!String)

Convert a narrow autodecoding string to an array type that fully supports random access. This is handled as a special case and always returns an array of dchar

NOTE: This function is never used when autodecoding is turned off.

Parameters

strisNarrowString to be converted to an array of dchar

Returns

a dchar[], const(dchar)[], or immutable(dchar)[] depending on the constness of

the input.