First element.
Precondition: array.length > 0.
string s = "Wenn die Wunde nicht mehr wehtut, schmerzt die Narbe"; static assert(is(typeof(s.front) == immutable char)); assert(s.front == 'W'); wstring w = "Волны несутся, гремя и сверкая"; static assert(is(typeof(w.front) == immutable wchar)); assert(w.front == 'В'); dstring d = "Для писателя память - это почти все"; static assert(is(typeof(d.front) == immutable dchar)); assert(d.front == 'Д');
Returns the first element of the array.
The element is returned by reference, so $(D_PSYMBOL front) can be also used to change the first element of array if it is mutable.