|
|
|
|
@@ -5,19 +5,14 @@
|
|
|
|
|
/**
|
|
|
|
|
* $(D_PSYMBOL tanya.range.array) implements range primitives for built-in arrays.
|
|
|
|
|
*
|
|
|
|
|
* This module is a submodule of
|
|
|
|
|
* $(LINK2 https://github.com/caraus-ecms/tanya/blob/master/source/tanya/range/package.d, tanya.range).
|
|
|
|
|
*
|
|
|
|
|
* After importing of
|
|
|
|
|
* $(LINK2 https://github.com/caraus-ecms/tanya/blob/master/source/tanya/range/array.d, tanya/range/array.d)
|
|
|
|
|
* built-in arrays can act as bidirectional ranges. For that to work the module
|
|
|
|
|
* defines a set of functions that accept a built-in array of any type as their
|
|
|
|
|
* first argument, so thanks to UFCS (Uniform Function Call Syntax) they can be
|
|
|
|
|
* called as if they were array member functions. For example the arrays the
|
|
|
|
|
* `.length`-property, but no `.empty` property. So here can be find the
|
|
|
|
|
* $(D_PSYMBOL empty) function. Since $(D_INLINECODE empty(array)) and
|
|
|
|
|
* $(D_INLINECODE array.empty) are equal for the arrays, arrays get a faked
|
|
|
|
|
* property `empty`.
|
|
|
|
|
* After importing of $(D_INLINECODE tanya.range.array) built-in arrays can act as
|
|
|
|
|
* bidirectional ranges. For that to work the module defines a set of functions
|
|
|
|
|
* that accept a built-in array of any type as their first argument, so thanks to
|
|
|
|
|
* UFCS (Uniform Function Call Syntax) they can be called as if they were array
|
|
|
|
|
* member functions. For example the arrays the `.length`-property, but no
|
|
|
|
|
* `.empty` property. So here can be find the * $(D_PSYMBOL empty) function.
|
|
|
|
|
* Since $(D_INLINECODE empty(array)) and $(D_INLINECODE array.empty) are equal
|
|
|
|
|
* for the arrays, arrays get a faked property `empty`.
|
|
|
|
|
*
|
|
|
|
|
* The functions in this module don't change array elements or its underlying
|
|
|
|
|
* storage, but some functions alter the slice. Each array maintains a pointer
|
|
|
|
|
@@ -27,16 +22,13 @@
|
|
|
|
|
* have multiple views into the same array, point to different positions inside
|
|
|
|
|
* it.
|
|
|
|
|
*
|
|
|
|
|
* Strings ($(D_INLINECODE char[]), (D_INLINECODE wchar[]) and
|
|
|
|
|
* (D_INLINECODE dchar[])) are treated as any other normal array, they aren't
|
|
|
|
|
* Strings ($(D_INLINECODE char[]), $(D_INLINECODE wchar[]) and
|
|
|
|
|
* $(D_INLINECODE dchar[])) are treated as any other normal array, they aren't
|
|
|
|
|
* auto-decoded.
|
|
|
|
|
*
|
|
|
|
|
* Copyright: Eugen Wissner 2017-2026.
|
|
|
|
|
* License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/,
|
|
|
|
|
* Mozilla Public License, v. 2.0).
|
|
|
|
|
* Authors: $(LINK2 mailto:info@caraus.de, Eugene Wissner)
|
|
|
|
|
* Source: $(LINK2 https://github.com/caraus-ecms/tanya/blob/master/source/tanya/range/array.d,
|
|
|
|
|
* tanya/range/array.d)
|
|
|
|
|
*/
|
|
|
|
|
module tanya.range.array;
|
|
|
|
|
|
|
|
|
|
|