mirror of
https://github.com/dlang/phobos.git
synced 2025-04-27 13:40:20 +03:00
Changed "Examples:" in Ddoc to "Example:"
This commit is contained in:
parent
b528be4d4c
commit
5f08c058ab
26 changed files with 233 additions and 233 deletions
|
@ -1939,7 +1939,7 @@ corresponding $(D sort), but $(D schwartzSort) evaluates $(D
|
||||||
transform) only $(D r.length) times (less than half when compared to
|
transform) only $(D r.length) times (less than half when compared to
|
||||||
regular sorting). The usage can be best illustrated with an example.
|
regular sorting). The usage can be best illustrated with an example.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
----
|
----
|
||||||
uint hashFun(string) { ... expensive computation ... }
|
uint hashFun(string) { ... expensive computation ... }
|
||||||
string[] array = ...;
|
string[] array = ...;
|
||||||
|
|
|
@ -1430,7 +1430,7 @@ alias splitter = std.algorithm.iteration.splitter;
|
||||||
The separator can be a value of the same type as the elements in $(D range)
|
The separator can be a value of the same type as the elements in $(D range)
|
||||||
or it can be another forward _range.
|
or it can be another forward _range.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
If $(D range) is a $(D string), $(D sep) can be a $(D char) or another
|
If $(D range) is a $(D string), $(D sep) can be a $(D char) or another
|
||||||
$(D string). The return type will be an array of strings. If $(D range) is
|
$(D string). The return type will be an array of strings. If $(D range) is
|
||||||
an $(D int) array, $(D sep) can be an $(D int) or another $(D int) array.
|
an $(D int) array, $(D sep) can be an $(D int) or another $(D int) array.
|
||||||
|
|
|
@ -1348,7 +1348,7 @@ final class RedBlackTree(T, alias less = "a < b", bool allowDuplicates = false)
|
||||||
|
|
||||||
Complexity: $(BIGOH m log(n)) (where m is the number of elements to remove)
|
Complexity: $(BIGOH m log(n)) (where m is the number of elements to remove)
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto rbt = redBlackTree!true(0, 1, 1, 1, 4, 5, 7);
|
auto rbt = redBlackTree!true(0, 1, 1, 1, 4, 5, 7);
|
||||||
rbt.removeKey(1, 4, 7);
|
rbt.removeKey(1, 4, 7);
|
||||||
|
|
|
@ -418,7 +418,7 @@ Returns: The number of values inserted.
|
||||||
Complexity: $(BIGOH k + m), where $(D k) is the number of elements in
|
Complexity: $(BIGOH k + m), where $(D k) is the number of elements in
|
||||||
$(D r) and $(D m) is the length of $(D stuff).
|
$(D r) and $(D m) is the length of $(D stuff).
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto sl = SList!string(["a", "b", "d"]);
|
auto sl = SList!string(["a", "b", "d"]);
|
||||||
sl.insertAfter(sl[], "e"); // insert at the end (slowest)
|
sl.insertAfter(sl[], "e"); // insert at the end (slowest)
|
||||||
|
|
|
@ -195,7 +195,7 @@ conversion is truncating towards zero, the same way a cast would
|
||||||
truncate. (To round a floating point value when casting to an
|
truncate. (To round a floating point value when casting to an
|
||||||
integral, use $(D_PARAM roundTo).)
|
integral, use $(D_PARAM roundTo).)
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
-------------------------
|
-------------------------
|
||||||
int a = 420;
|
int a = 420;
|
||||||
auto b = to!long(a); // same as long b = a;
|
auto b = to!long(a); // same as long b = a;
|
||||||
|
|
214
std/datetime.d
214
std/datetime.d
|
@ -17893,7 +17893,7 @@ public:
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if $(D_PARAM end) is before $(D_PARAM begin).
|
$(LREF DateTimeException) if $(D_PARAM end) is before $(D_PARAM begin).
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1));
|
Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1));
|
||||||
--------------------
|
--------------------
|
||||||
|
@ -17918,7 +17918,7 @@ Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1));
|
||||||
$(LREF DateTimeException) if the resulting $(D end) is before
|
$(LREF DateTimeException) if the resulting $(D end) is before
|
||||||
$(D begin).
|
$(D begin).
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(Interval!Date(Date(1996, 1, 2), dur!"years"(3)) ==
|
assert(Interval!Date(Date(1996, 1, 2), dur!"years"(3)) ==
|
||||||
Interval!Date(Date(1996, 1, 2), Date(1999, 1, 2)));
|
Interval!Date(Date(1996, 1, 2), Date(1999, 1, 2)));
|
||||||
|
@ -17962,7 +17962,7 @@ assert(Interval!Date(Date(1996, 1, 2), dur!"years"(3)) ==
|
||||||
/++
|
/++
|
||||||
The starting point of the interval. It is included in the interval.
|
The starting point of the interval. It is included in the interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).begin ==
|
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).begin ==
|
||||||
Date(1996, 1, 2));
|
Date(1996, 1, 2));
|
||||||
|
@ -17995,7 +17995,7 @@ assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).begin ==
|
||||||
/++
|
/++
|
||||||
The end point of the interval. It is excluded from the interval.
|
The end point of the interval. It is excluded from the interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).end ==
|
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).end ==
|
||||||
Date(2012, 3, 1));
|
Date(2012, 3, 1));
|
||||||
|
@ -18028,7 +18028,7 @@ assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).end ==
|
||||||
/++
|
/++
|
||||||
Returns the duration between $(D begin) and $(D end).
|
Returns the duration between $(D begin) and $(D end).
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).length ==
|
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).length ==
|
||||||
dur!"days"(5903));
|
dur!"days"(5903));
|
||||||
|
@ -18043,7 +18043,7 @@ assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).length ==
|
||||||
/++
|
/++
|
||||||
Whether the interval's length is 0, that is, whether $(D begin == end).
|
Whether the interval's length is 0, that is, whether $(D begin == end).
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(Interval!Date(Date(1996, 1, 2), Date(1996, 1, 2)).empty);
|
assert(Interval!Date(Date(1996, 1, 2), Date(1996, 1, 2)).empty);
|
||||||
assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).empty);
|
assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).empty);
|
||||||
|
@ -18064,7 +18064,7 @@ assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).empty);
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if this interval is empty.
|
$(LREF DateTimeException) if this interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).contains(
|
assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).contains(
|
||||||
Date(1994, 12, 24)));
|
Date(1994, 12, 24)));
|
||||||
|
@ -18092,7 +18092,7 @@ assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).contains(
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if either interval is empty.
|
$(LREF DateTimeException) if either interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).contains(
|
assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).contains(
|
||||||
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))));
|
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))));
|
||||||
|
@ -18128,7 +18128,7 @@ assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).contains(
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if this interval is empty.
|
$(LREF DateTimeException) if this interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).contains(
|
assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).contains(
|
||||||
PosInfInterval!Date(Date(1999, 5, 4))));
|
PosInfInterval!Date(Date(1999, 5, 4))));
|
||||||
|
@ -18155,7 +18155,7 @@ assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).contains(
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if this interval is empty.
|
$(LREF DateTimeException) if this interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).contains(
|
assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).contains(
|
||||||
NegInfInterval!Date(Date(1996, 5, 4))));
|
NegInfInterval!Date(Date(1996, 5, 4))));
|
||||||
|
@ -18179,7 +18179,7 @@ assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).contains(
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if this interval is empty.
|
$(LREF DateTimeException) if this interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isBefore(
|
assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isBefore(
|
||||||
Date(1994, 12, 24)));
|
Date(1994, 12, 24)));
|
||||||
|
@ -18209,7 +18209,7 @@ assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isBefore(
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if either interval is empty.
|
$(LREF DateTimeException) if either interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isBefore(
|
assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isBefore(
|
||||||
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))));
|
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))));
|
||||||
|
@ -18240,7 +18240,7 @@ assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isBefore(
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if this interval is empty.
|
$(LREF DateTimeException) if this interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isBefore(
|
assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isBefore(
|
||||||
PosInfInterval!Date(Date(1999, 5, 4))));
|
PosInfInterval!Date(Date(1999, 5, 4))));
|
||||||
|
@ -18270,7 +18270,7 @@ assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isBefore(
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if this interval is empty.
|
$(LREF DateTimeException) if this interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isBefore(
|
assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isBefore(
|
||||||
NegInfInterval!Date(Date(1996, 5, 4))));
|
NegInfInterval!Date(Date(1996, 5, 4))));
|
||||||
|
@ -18294,7 +18294,7 @@ assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isBefore(
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if this interval is empty.
|
$(LREF DateTimeException) if this interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isAfter(
|
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isAfter(
|
||||||
Date(1994, 12, 24)));
|
Date(1994, 12, 24)));
|
||||||
|
@ -18324,7 +18324,7 @@ assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isAfter(
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if either interval is empty.
|
$(LREF DateTimeException) if either interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isAfter(
|
assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isAfter(
|
||||||
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))));
|
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))));
|
||||||
|
@ -18358,7 +18358,7 @@ assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isAfter(
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if this interval is empty.
|
$(LREF DateTimeException) if this interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isAfter(
|
assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isAfter(
|
||||||
PosInfInterval!Date(Date(1999, 5, 4))));
|
PosInfInterval!Date(Date(1999, 5, 4))));
|
||||||
|
@ -18382,7 +18382,7 @@ assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isAfter(
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if this interval is empty.
|
$(LREF DateTimeException) if this interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isAfter(
|
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isAfter(
|
||||||
NegInfInterval!Date(Date(1996, 1, 2))));
|
NegInfInterval!Date(Date(1996, 1, 2))));
|
||||||
|
@ -18405,7 +18405,7 @@ assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isAfter(
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if either interval is empty.
|
$(LREF DateTimeException) if either interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).intersects(
|
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).intersects(
|
||||||
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))));
|
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))));
|
||||||
|
@ -18435,7 +18435,7 @@ assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).intersects(
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if this interval is empty.
|
$(LREF DateTimeException) if this interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).intersects(
|
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).intersects(
|
||||||
PosInfInterval!Date(Date(1999, 5, 4))));
|
PosInfInterval!Date(Date(1999, 5, 4))));
|
||||||
|
@ -18461,7 +18461,7 @@ assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).intersects(
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if this interval is empty.
|
$(LREF DateTimeException) if this interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).intersects(
|
assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).intersects(
|
||||||
NegInfInterval!Date(Date(1996, 1, 2))));
|
NegInfInterval!Date(Date(1996, 1, 2))));
|
||||||
|
@ -18488,7 +18488,7 @@ assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).intersects(
|
||||||
$(LREF DateTimeException) if the two intervals do not intersect or if
|
$(LREF DateTimeException) if the two intervals do not intersect or if
|
||||||
either interval is empty.
|
either interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).intersection(
|
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).intersection(
|
||||||
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))) ==
|
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))) ==
|
||||||
|
@ -18522,7 +18522,7 @@ assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).intersection(
|
||||||
$(LREF DateTimeException) if the two intervals do not intersect or if
|
$(LREF DateTimeException) if the two intervals do not intersect or if
|
||||||
this interval is empty.
|
this interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).intersection(
|
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).intersection(
|
||||||
PosInfInterval!Date(Date(1990, 7, 6))) ==
|
PosInfInterval!Date(Date(1990, 7, 6))) ==
|
||||||
|
@ -18553,7 +18553,7 @@ assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).intersection(
|
||||||
$(LREF DateTimeException) if the two intervals do not intersect or if
|
$(LREF DateTimeException) if the two intervals do not intersect or if
|
||||||
this interval is empty.
|
this interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).intersection(
|
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).intersection(
|
||||||
NegInfInterval!Date(Date(1999, 7, 6))) ==
|
NegInfInterval!Date(Date(1999, 7, 6))) ==
|
||||||
|
@ -18584,7 +18584,7 @@ assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).intersection(
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if either interval is empty.
|
$(LREF DateTimeException) if either interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isAdjacent(
|
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isAdjacent(
|
||||||
Interval!Date(Date(1990, 7, 6), Date(1996, 1, 2))));
|
Interval!Date(Date(1990, 7, 6), Date(1996, 1, 2))));
|
||||||
|
@ -18615,7 +18615,7 @@ assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isAdjacent(
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if this interval is empty.
|
$(LREF DateTimeException) if this interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isAdjacent(
|
assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isAdjacent(
|
||||||
PosInfInterval!Date(Date(1999, 5, 4))));
|
PosInfInterval!Date(Date(1999, 5, 4))));
|
||||||
|
@ -18642,7 +18642,7 @@ assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isAdjacent(
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if this interval is empty.
|
$(LREF DateTimeException) if this interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isAdjacent(
|
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isAdjacent(
|
||||||
NegInfInterval!Date(Date(1996, 1, 2))));
|
NegInfInterval!Date(Date(1996, 1, 2))));
|
||||||
|
@ -18669,7 +18669,7 @@ assert(!Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).isAdjacent(
|
||||||
$(LREF DateTimeException) if the two intervals do not intersect and are
|
$(LREF DateTimeException) if the two intervals do not intersect and are
|
||||||
not adjacent or if either interval is empty.
|
not adjacent or if either interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).merge(
|
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).merge(
|
||||||
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))) ==
|
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))) ==
|
||||||
|
@ -18704,7 +18704,7 @@ assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).merge(
|
||||||
$(LREF DateTimeException) if the two intervals do not intersect and are
|
$(LREF DateTimeException) if the two intervals do not intersect and are
|
||||||
not adjacent or if this interval is empty.
|
not adjacent or if this interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).merge(
|
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).merge(
|
||||||
PosInfInterval!Date(Date(1990, 7, 6))) ==
|
PosInfInterval!Date(Date(1990, 7, 6))) ==
|
||||||
|
@ -18736,7 +18736,7 @@ assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).merge(
|
||||||
$(LREF DateTimeException) if the two intervals do not intersect and are not
|
$(LREF DateTimeException) if the two intervals do not intersect and are not
|
||||||
adjacent or if this interval is empty.
|
adjacent or if this interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).merge(
|
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).merge(
|
||||||
NegInfInterval!Date(Date(1996, 1, 2))) ==
|
NegInfInterval!Date(Date(1996, 1, 2))) ==
|
||||||
|
@ -18769,7 +18769,7 @@ assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).merge(
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if either interval is empty.
|
$(LREF DateTimeException) if either interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).span(
|
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).span(
|
||||||
Interval!Date(Date(1990, 7, 6), Date(1991, 1, 8))) ==
|
Interval!Date(Date(1990, 7, 6), Date(1991, 1, 8))) ==
|
||||||
|
@ -18803,7 +18803,7 @@ assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).span(
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if this interval is empty.
|
$(LREF DateTimeException) if this interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).span(
|
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).span(
|
||||||
PosInfInterval!Date(Date(1990, 7, 6))) ==
|
PosInfInterval!Date(Date(1990, 7, 6))) ==
|
||||||
|
@ -18833,7 +18833,7 @@ assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).span(
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if this interval is empty.
|
$(LREF DateTimeException) if this interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).span(
|
assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).span(
|
||||||
NegInfInterval!Date(Date(1602, 5, 21))) ==
|
NegInfInterval!Date(Date(1602, 5, 21))) ==
|
||||||
|
@ -18865,7 +18865,7 @@ assert(Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1)).span(
|
||||||
$(LREF DateTimeException) this interval is empty or if the resulting
|
$(LREF DateTimeException) this interval is empty or if the resulting
|
||||||
interval would be invalid.
|
interval would be invalid.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto interval1 = Interval!Date(Date(1996, 1, 2), Date(2012, 4, 5));
|
auto interval1 = Interval!Date(Date(1996, 1, 2), Date(2012, 4, 5));
|
||||||
auto interval2 = Interval!Date(Date(1996, 1, 2), Date(2012, 4, 5));
|
auto interval2 = Interval!Date(Date(1996, 1, 2), Date(2012, 4, 5));
|
||||||
|
@ -18915,7 +18915,7 @@ assert(interval2 == Interval!Date(Date(1995, 11, 13), Date(2012, 2, 15)));
|
||||||
$(LREF DateTimeException) if this interval is empty or if the
|
$(LREF DateTimeException) if this interval is empty or if the
|
||||||
resulting interval would be invalid.
|
resulting interval would be invalid.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto interval1 = Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1));
|
auto interval1 = Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1));
|
||||||
auto interval2 = Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1));
|
auto interval2 = Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1));
|
||||||
|
@ -18962,7 +18962,7 @@ assert(interval2 == Interval!Date(Date(1994, 1, 2), Date(2010, 3, 1)));
|
||||||
$(LREF DateTimeException) this interval is empty or if the resulting
|
$(LREF DateTimeException) this interval is empty or if the resulting
|
||||||
interval would be invalid.
|
interval would be invalid.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto interval1 = Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1));
|
auto interval1 = Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1));
|
||||||
auto interval2 = Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1));
|
auto interval2 = Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1));
|
||||||
|
@ -19040,7 +19040,7 @@ assert(interval2 == Interval!Date(Date(1998, 1, 2), Date(2010, 3, 1)));
|
||||||
$(LREF DateTimeException) if this interval is empty or if the
|
$(LREF DateTimeException) if this interval is empty or if the
|
||||||
resulting interval would be invalid.
|
resulting interval would be invalid.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto interval1 = Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1));
|
auto interval1 = Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1));
|
||||||
auto interval2 = Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1));
|
auto interval2 = Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1));
|
||||||
|
@ -19155,7 +19155,7 @@ assert(interval2 == Interval!Date(Date(1998, 1, 2), Date(2010, 3, 1)));
|
||||||
Of course, none of the functions in this module have this problem,
|
Of course, none of the functions in this module have this problem,
|
||||||
so it's only relevant if when creating a custom delegate.
|
so it's only relevant if when creating a custom delegate.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto interval = Interval!Date(Date(2010, 9, 1), Date(2010, 9, 9));
|
auto interval = Interval!Date(Date(2010, 9, 1), Date(2010, 9, 9));
|
||||||
auto func = (in Date date) //For iterating over even-numbered days.
|
auto func = (in Date date) //For iterating over even-numbered days.
|
||||||
|
@ -19248,7 +19248,7 @@ assert(range.empty);
|
||||||
Of course, none of the functions in this module have this problem,
|
Of course, none of the functions in this module have this problem,
|
||||||
so it's only relevant for custom delegates.
|
so it's only relevant for custom delegates.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto interval = Interval!Date(Date(2010, 9, 1), Date(2010, 9, 9));
|
auto interval = Interval!Date(Date(2010, 9, 1), Date(2010, 9, 9));
|
||||||
auto func = (in Date date) //For iterating over even-numbered days.
|
auto func = (in Date date) //For iterating over even-numbered days.
|
||||||
|
@ -20799,7 +20799,7 @@ public:
|
||||||
Params:
|
Params:
|
||||||
begin = The time point which begins the interval.
|
begin = The time point which begins the interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto interval = PosInfInterval!Date(Date(1996, 1, 2));
|
auto interval = PosInfInterval!Date(Date(1996, 1, 2));
|
||||||
--------------------
|
--------------------
|
||||||
|
@ -20835,7 +20835,7 @@ auto interval = PosInfInterval!Date(Date(1996, 1, 2));
|
||||||
/++
|
/++
|
||||||
The starting point of the interval. It is included in the interval.
|
The starting point of the interval. It is included in the interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(PosInfInterval!Date(Date(1996, 1, 2)).begin == Date(1996, 1, 2));
|
assert(PosInfInterval!Date(Date(1996, 1, 2)).begin == Date(1996, 1, 2));
|
||||||
--------------------
|
--------------------
|
||||||
|
@ -20861,7 +20861,7 @@ assert(PosInfInterval!Date(Date(1996, 1, 2)).begin == Date(1996, 1, 2));
|
||||||
/++
|
/++
|
||||||
Whether the interval's length is 0. Always returns false.
|
Whether the interval's length is 0. Always returns false.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!PosInfInterval!Date(Date(1996, 1, 2)).empty);
|
assert(!PosInfInterval!Date(Date(1996, 1, 2)).empty);
|
||||||
--------------------
|
--------------------
|
||||||
|
@ -20878,7 +20878,7 @@ assert(!PosInfInterval!Date(Date(1996, 1, 2)).empty);
|
||||||
Params:
|
Params:
|
||||||
timePoint = The time point to check for inclusion in this interval.
|
timePoint = The time point to check for inclusion in this interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!PosInfInterval!Date(Date(1996, 1, 2)).contains(Date(1994, 12, 24)));
|
assert(!PosInfInterval!Date(Date(1996, 1, 2)).contains(Date(1994, 12, 24)));
|
||||||
assert(PosInfInterval!Date(Date(1996, 1, 2)).contains(Date(2000, 1, 5)));
|
assert(PosInfInterval!Date(Date(1996, 1, 2)).contains(Date(2000, 1, 5)));
|
||||||
|
@ -20899,7 +20899,7 @@ assert(PosInfInterval!Date(Date(1996, 1, 2)).contains(Date(2000, 1, 5)));
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if the given interval is empty.
|
$(LREF DateTimeException) if the given interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!PosInfInterval!Date(Date(1996, 1, 2)).contains(
|
assert(!PosInfInterval!Date(Date(1996, 1, 2)).contains(
|
||||||
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))));
|
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))));
|
||||||
|
@ -20925,7 +20925,7 @@ assert(PosInfInterval!Date(Date(1996, 1, 2)).contains(
|
||||||
Params:
|
Params:
|
||||||
interval = The interval to check for inclusion in this interval.
|
interval = The interval to check for inclusion in this interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(PosInfInterval!Date(Date(1996, 1, 2)).contains(
|
assert(PosInfInterval!Date(Date(1996, 1, 2)).contains(
|
||||||
PosInfInterval!Date(Date(1999, 5, 4))));
|
PosInfInterval!Date(Date(1999, 5, 4))));
|
||||||
|
@ -20949,7 +20949,7 @@ assert(!PosInfInterval!Date(Date(1996, 1, 2)).contains(
|
||||||
Params:
|
Params:
|
||||||
interval = The interval to check for inclusion in this interval.
|
interval = The interval to check for inclusion in this interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!PosInfInterval!Date(Date(1996, 1, 2)).contains(
|
assert(!PosInfInterval!Date(Date(1996, 1, 2)).contains(
|
||||||
NegInfInterval!Date(Date(1996, 5, 4))));
|
NegInfInterval!Date(Date(1996, 5, 4))));
|
||||||
|
@ -20971,7 +20971,7 @@ assert(!PosInfInterval!Date(Date(1996, 1, 2)).contains(
|
||||||
timePoint = The time point to check whether this interval is before
|
timePoint = The time point to check whether this interval is before
|
||||||
it.
|
it.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!PosInfInterval!Date(Date(1996, 1, 2)).isBefore(Date(1994, 12, 24)));
|
assert(!PosInfInterval!Date(Date(1996, 1, 2)).isBefore(Date(1994, 12, 24)));
|
||||||
assert(!PosInfInterval!Date(Date(1996, 1, 2)).isBefore(Date(2000, 1, 5)));
|
assert(!PosInfInterval!Date(Date(1996, 1, 2)).isBefore(Date(2000, 1, 5)));
|
||||||
|
@ -20997,7 +20997,7 @@ assert(!PosInfInterval!Date(Date(1996, 1, 2)).isBefore(Date(2000, 1, 5)));
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if the given interval is empty.
|
$(LREF DateTimeException) if the given interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!PosInfInterval!Date(Date(1996, 1, 2)).isBefore(
|
assert(!PosInfInterval!Date(Date(1996, 1, 2)).isBefore(
|
||||||
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))));
|
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))));
|
||||||
|
@ -21024,7 +21024,7 @@ assert(!PosInfInterval!Date(Date(1996, 1, 2)).isBefore(
|
||||||
Params:
|
Params:
|
||||||
interval = The interval to check for against this interval.
|
interval = The interval to check for against this interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!PosInfInterval!Date(Date(1996, 1, 2)).isBefore(
|
assert(!PosInfInterval!Date(Date(1996, 1, 2)).isBefore(
|
||||||
PosInfInterval!Date(Date(1992, 5, 4))));
|
PosInfInterval!Date(Date(1992, 5, 4))));
|
||||||
|
@ -21049,7 +21049,7 @@ assert(!PosInfInterval!Date(Date(1996, 1, 2)).isBefore(
|
||||||
Params:
|
Params:
|
||||||
interval = The interval to check for against this interval.
|
interval = The interval to check for against this interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!PosInfInterval!Date(Date(1996, 1, 2)).isBefore(
|
assert(!PosInfInterval!Date(Date(1996, 1, 2)).isBefore(
|
||||||
NegInfInterval!Date(Date(1996, 5, 4))));
|
NegInfInterval!Date(Date(1996, 5, 4))));
|
||||||
|
@ -21068,7 +21068,7 @@ assert(!PosInfInterval!Date(Date(1996, 1, 2)).isBefore(
|
||||||
timePoint = The time point to check whether this interval is after
|
timePoint = The time point to check whether this interval is after
|
||||||
it.
|
it.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(PosInfInterval!Date(Date(1996, 1, 2)).isAfter(Date(1994, 12, 24)));
|
assert(PosInfInterval!Date(Date(1996, 1, 2)).isAfter(Date(1994, 12, 24)));
|
||||||
assert(!PosInfInterval!Date(Date(1996, 1, 2)).isAfter(Date(2000, 1, 5)));
|
assert(!PosInfInterval!Date(Date(1996, 1, 2)).isAfter(Date(2000, 1, 5)));
|
||||||
|
@ -21090,7 +21090,7 @@ assert(!PosInfInterval!Date(Date(1996, 1, 2)).isAfter(Date(2000, 1, 5)));
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if the given interval is empty.
|
$(LREF DateTimeException) if the given interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!PosInfInterval!Date(Date(1996, 1, 2)).isAfter(
|
assert(!PosInfInterval!Date(Date(1996, 1, 2)).isAfter(
|
||||||
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))));
|
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))));
|
||||||
|
@ -21120,7 +21120,7 @@ assert(PosInfInterval!Date(Date(1996, 1, 2)).isAfter(
|
||||||
Params:
|
Params:
|
||||||
interval = The interval to check against this interval.
|
interval = The interval to check against this interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!PosInfInterval!Date(Date(1996, 1, 2)).isAfter(
|
assert(!PosInfInterval!Date(Date(1996, 1, 2)).isAfter(
|
||||||
PosInfInterval!Date(Date(1990, 1, 7))));
|
PosInfInterval!Date(Date(1990, 1, 7))));
|
||||||
|
@ -21142,7 +21142,7 @@ assert(!PosInfInterval!Date(Date(1996, 1, 2)).isAfter(
|
||||||
Params:
|
Params:
|
||||||
interval = The interval to check against this interval.
|
interval = The interval to check against this interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(PosInfInterval!Date(Date(1996, 1, 2)).isAfter(
|
assert(PosInfInterval!Date(Date(1996, 1, 2)).isAfter(
|
||||||
NegInfInterval!Date(Date(1996, 1, 2))));
|
NegInfInterval!Date(Date(1996, 1, 2))));
|
||||||
|
@ -21166,7 +21166,7 @@ assert(!PosInfInterval!Date(Date(1996, 1, 2)).isAfter(
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if the given interval is empty.
|
$(LREF DateTimeException) if the given interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(PosInfInterval!Date(Date(1996, 1, 2)).intersects(
|
assert(PosInfInterval!Date(Date(1996, 1, 2)).intersects(
|
||||||
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))));
|
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))));
|
||||||
|
@ -21196,7 +21196,7 @@ assert(!PosInfInterval!Date(Date(1996, 1, 2)).intersects(
|
||||||
interval = The interval to check for intersection with this
|
interval = The interval to check for intersection with this
|
||||||
interval.
|
interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(PosInfInterval!Date(Date(1996, 1, 2)).intersects(
|
assert(PosInfInterval!Date(Date(1996, 1, 2)).intersects(
|
||||||
PosInfInterval!Date(Date(1990, 1, 7))));
|
PosInfInterval!Date(Date(1990, 1, 7))));
|
||||||
|
@ -21218,7 +21218,7 @@ assert(PosInfInterval!Date(Date(1996, 1, 2)).intersects(
|
||||||
interval = The interval to check for intersection with this
|
interval = The interval to check for intersection with this
|
||||||
interval.
|
interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!PosInfInterval!Date(Date(1996, 1, 2)).intersects(
|
assert(!PosInfInterval!Date(Date(1996, 1, 2)).intersects(
|
||||||
NegInfInterval!Date(Date(1996, 1, 2))));
|
NegInfInterval!Date(Date(1996, 1, 2))));
|
||||||
|
@ -21243,7 +21243,7 @@ assert(PosInfInterval!Date(Date(1996, 1, 2)).intersects(
|
||||||
$(LREF DateTimeException) if the two intervals do not intersect or if
|
$(LREF DateTimeException) if the two intervals do not intersect or if
|
||||||
the given interval is empty.
|
the given interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(PosInfInterval!Date(Date(1996, 1, 2)).intersection(
|
assert(PosInfInterval!Date(Date(1996, 1, 2)).intersection(
|
||||||
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))) ==
|
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))) ==
|
||||||
|
@ -21272,7 +21272,7 @@ assert(PosInfInterval!Date(Date(1996, 1, 2)).intersection(
|
||||||
Params:
|
Params:
|
||||||
interval = The interval to intersect with this interval.
|
interval = The interval to intersect with this interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(PosInfInterval!Date(Date(1996, 1, 2)).intersection(
|
assert(PosInfInterval!Date(Date(1996, 1, 2)).intersection(
|
||||||
PosInfInterval!Date(Date(1990, 7, 6))) ==
|
PosInfInterval!Date(Date(1990, 7, 6))) ==
|
||||||
|
@ -21298,7 +21298,7 @@ assert(PosInfInterval!Date(Date(1996, 1, 2)).intersection(
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if the two intervals do not intersect.
|
$(LREF DateTimeException) if the two intervals do not intersect.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(PosInfInterval!Date(Date(1996, 1, 2)).intersection(
|
assert(PosInfInterval!Date(Date(1996, 1, 2)).intersection(
|
||||||
NegInfInterval!Date(Date(1999, 7, 6))) ==
|
NegInfInterval!Date(Date(1999, 7, 6))) ==
|
||||||
|
@ -21329,7 +21329,7 @@ assert(PosInfInterval!Date(Date(1996, 1, 2)).intersection(
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if the given interval is empty.
|
$(LREF DateTimeException) if the given interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(PosInfInterval!Date(Date(1996, 1, 2)).isAdjacent(
|
assert(PosInfInterval!Date(Date(1996, 1, 2)).isAdjacent(
|
||||||
Interval!Date(Date(1989, 3, 1), Date(1996, 1, 2))));
|
Interval!Date(Date(1989, 3, 1), Date(1996, 1, 2))));
|
||||||
|
@ -21356,7 +21356,7 @@ assert(!PosInfInterval!Date(Date(1999, 1, 12)).isAdjacent(
|
||||||
interval = The interval to check whether its adjecent to this
|
interval = The interval to check whether its adjecent to this
|
||||||
interval.
|
interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!PosInfInterval!Date(Date(1996, 1, 2)).isAdjacent(
|
assert(!PosInfInterval!Date(Date(1996, 1, 2)).isAdjacent(
|
||||||
PosInfInterval!Date(Date(1990, 1, 7))));
|
PosInfInterval!Date(Date(1990, 1, 7))));
|
||||||
|
@ -21378,7 +21378,7 @@ assert(!PosInfInterval!Date(Date(1996, 1, 2)).isAdjacent(
|
||||||
interval = The interval to check whether its adjecent to this
|
interval = The interval to check whether its adjecent to this
|
||||||
interval.
|
interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(PosInfInterval!Date(Date(1996, 1, 2)).isAdjacent(
|
assert(PosInfInterval!Date(Date(1996, 1, 2)).isAdjacent(
|
||||||
NegInfInterval!Date(Date(1996, 1, 2))));
|
NegInfInterval!Date(Date(1996, 1, 2))));
|
||||||
|
@ -21409,7 +21409,7 @@ assert(!PosInfInterval!Date(Date(1996, 1, 2)).isAdjacent(
|
||||||
going from negative infinity to positive infinity
|
going from negative infinity to positive infinity
|
||||||
is not possible.
|
is not possible.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(PosInfInterval!Date(Date(1996, 1, 2)).merge(
|
assert(PosInfInterval!Date(Date(1996, 1, 2)).merge(
|
||||||
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))) ==
|
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))) ==
|
||||||
|
@ -21443,7 +21443,7 @@ assert(PosInfInterval!Date(Date(1996, 1, 2)).merge(
|
||||||
going from negative infinity to positive infinity
|
going from negative infinity to positive infinity
|
||||||
is not possible.
|
is not possible.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(PosInfInterval!Date(Date(1996, 1, 2)).merge(
|
assert(PosInfInterval!Date(Date(1996, 1, 2)).merge(
|
||||||
PosInfInterval!Date(Date(1990, 7, 6))) ==
|
PosInfInterval!Date(Date(1990, 7, 6))) ==
|
||||||
|
@ -21478,7 +21478,7 @@ assert(PosInfInterval!Date(Date(1996, 1, 2)).merge(
|
||||||
going from negative infinity to positive infinity
|
going from negative infinity to positive infinity
|
||||||
is not possible.
|
is not possible.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(PosInfInterval!Date(Date(1996, 1, 2)).span(
|
assert(PosInfInterval!Date(Date(1996, 1, 2)).span(
|
||||||
Interval!Date(Date(500, 8, 9), Date(1602, 1, 31))) ==
|
Interval!Date(Date(500, 8, 9), Date(1602, 1, 31))) ==
|
||||||
|
@ -21516,7 +21516,7 @@ assert(PosInfInterval!Date(Date(1996, 1, 2)).span(
|
||||||
going from negative infinity to positive infinity
|
going from negative infinity to positive infinity
|
||||||
is not possible.
|
is not possible.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(PosInfInterval!Date(Date(1996, 1, 2)).span(
|
assert(PosInfInterval!Date(Date(1996, 1, 2)).span(
|
||||||
PosInfInterval!Date(Date(1990, 7, 6))) ==
|
PosInfInterval!Date(Date(1990, 7, 6))) ==
|
||||||
|
@ -21542,7 +21542,7 @@ assert(PosInfInterval!Date(Date(1996, 1, 2)).span(
|
||||||
Params:
|
Params:
|
||||||
duration = The duration to shift the interval by.
|
duration = The duration to shift the interval by.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto interval1 = PosInfInterval!Date(Date(1996, 1, 2));
|
auto interval1 = PosInfInterval!Date(Date(1996, 1, 2));
|
||||||
auto interval2 = PosInfInterval!Date(Date(1996, 1, 2));
|
auto interval2 = PosInfInterval!Date(Date(1996, 1, 2));
|
||||||
|
@ -21583,7 +21583,7 @@ assert(interval2 == PosInfInterval!Date(Date(1995, 11, 13)));
|
||||||
$(LREF DateTimeException) if this interval is empty or if the
|
$(LREF DateTimeException) if this interval is empty or if the
|
||||||
resulting interval would be invalid.
|
resulting interval would be invalid.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto interval1 = PosInfInterval!Date(Date(1996, 1, 2));
|
auto interval1 = PosInfInterval!Date(Date(1996, 1, 2));
|
||||||
auto interval2 = PosInfInterval!Date(Date(1996, 1, 2));
|
auto interval2 = PosInfInterval!Date(Date(1996, 1, 2));
|
||||||
|
@ -21615,7 +21615,7 @@ assert(interval2 == PosInfInterval!Date(Date(1995, 11, 13)));
|
||||||
Params:
|
Params:
|
||||||
duration = The duration to expand the interval by.
|
duration = The duration to expand the interval by.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto interval1 = PosInfInterval!Date(Date(1996, 1, 2));
|
auto interval1 = PosInfInterval!Date(Date(1996, 1, 2));
|
||||||
auto interval2 = PosInfInterval!Date(Date(1996, 1, 2));
|
auto interval2 = PosInfInterval!Date(Date(1996, 1, 2));
|
||||||
|
@ -21651,7 +21651,7 @@ assert(interval2 == PosInfInterval!Date(Date(1996, 1, 4)));
|
||||||
$(LREF DateTimeException) if this interval is empty or if the
|
$(LREF DateTimeException) if this interval is empty or if the
|
||||||
resulting interval would be invalid.
|
resulting interval would be invalid.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto interval1 = PosInfInterval!Date(Date(1996, 1, 2));
|
auto interval1 = PosInfInterval!Date(Date(1996, 1, 2));
|
||||||
auto interval2 = PosInfInterval!Date(Date(1996, 1, 2));
|
auto interval2 = PosInfInterval!Date(Date(1996, 1, 2));
|
||||||
|
@ -21725,7 +21725,7 @@ assert(interval2 == PosInfInterval!Date(Date(1998, 1, 2)));
|
||||||
Of course, none of the functions in this module have this problem,
|
Of course, none of the functions in this module have this problem,
|
||||||
so it's only relevant for custom delegates.
|
so it's only relevant for custom delegates.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto interval = PosInfInterval!Date(Date(2010, 9, 1));
|
auto interval = PosInfInterval!Date(Date(2010, 9, 1));
|
||||||
auto func = (in Date date) //For iterating over even-numbered days.
|
auto func = (in Date date) //For iterating over even-numbered days.
|
||||||
|
@ -22991,7 +22991,7 @@ public:
|
||||||
Params:
|
Params:
|
||||||
end = The time point which ends the interval.
|
end = The time point which ends the interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto interval = PosInfInterval!Date(Date(1996, 1, 2));
|
auto interval = PosInfInterval!Date(Date(1996, 1, 2));
|
||||||
--------------------
|
--------------------
|
||||||
|
@ -23027,7 +23027,7 @@ auto interval = PosInfInterval!Date(Date(1996, 1, 2));
|
||||||
/++
|
/++
|
||||||
The end point of the interval. It is excluded from the interval.
|
The end point of the interval. It is excluded from the interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(NegInfInterval!Date(Date(2012, 3, 1)).end == Date(2012, 3, 1));
|
assert(NegInfInterval!Date(Date(2012, 3, 1)).end == Date(2012, 3, 1));
|
||||||
--------------------
|
--------------------
|
||||||
|
@ -23053,7 +23053,7 @@ assert(NegInfInterval!Date(Date(2012, 3, 1)).end == Date(2012, 3, 1));
|
||||||
/++
|
/++
|
||||||
Whether the interval's length is 0. Always returns false.
|
Whether the interval's length is 0. Always returns false.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!NegInfInterval!Date(Date(1996, 1, 2)).empty);
|
assert(!NegInfInterval!Date(Date(1996, 1, 2)).empty);
|
||||||
--------------------
|
--------------------
|
||||||
|
@ -23070,7 +23070,7 @@ assert(!NegInfInterval!Date(Date(1996, 1, 2)).empty);
|
||||||
Params:
|
Params:
|
||||||
timePoint = The time point to check for inclusion in this interval.
|
timePoint = The time point to check for inclusion in this interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(NegInfInterval!Date(Date(2012, 3, 1)).contains(Date(1994, 12, 24)));
|
assert(NegInfInterval!Date(Date(2012, 3, 1)).contains(Date(1994, 12, 24)));
|
||||||
assert(NegInfInterval!Date(Date(2012, 3, 1)).contains(Date(2000, 1, 5)));
|
assert(NegInfInterval!Date(Date(2012, 3, 1)).contains(Date(2000, 1, 5)));
|
||||||
|
@ -23092,7 +23092,7 @@ assert(!NegInfInterval!Date(Date(2012, 3, 1)).contains(Date(2012, 3, 1)));
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if the given interval is empty.
|
$(LREF DateTimeException) if the given interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(NegInfInterval!Date(Date(2012, 3, 1)).contains(
|
assert(NegInfInterval!Date(Date(2012, 3, 1)).contains(
|
||||||
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))));
|
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))));
|
||||||
|
@ -23121,7 +23121,7 @@ assert(!NegInfInterval!Date(Date(2012, 3, 1)).contains(
|
||||||
Params:
|
Params:
|
||||||
interval = The interval to check for inclusion in this interval.
|
interval = The interval to check for inclusion in this interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!NegInfInterval!Date(Date(2012, 3, 1)).contains(
|
assert(!NegInfInterval!Date(Date(2012, 3, 1)).contains(
|
||||||
PosInfInterval!Date(Date(1999, 5, 4))));
|
PosInfInterval!Date(Date(1999, 5, 4))));
|
||||||
|
@ -23139,7 +23139,7 @@ assert(!NegInfInterval!Date(Date(2012, 3, 1)).contains(
|
||||||
Params:
|
Params:
|
||||||
interval = The interval to check for inclusion in this interval.
|
interval = The interval to check for inclusion in this interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(NegInfInterval!Date(Date(2012, 3, 1)).contains(
|
assert(NegInfInterval!Date(Date(2012, 3, 1)).contains(
|
||||||
NegInfInterval!Date(Date(1996, 5, 4))));
|
NegInfInterval!Date(Date(1996, 5, 4))));
|
||||||
|
@ -23161,7 +23161,7 @@ assert(!NegInfInterval!Date(Date(2012, 3, 1)).contains(
|
||||||
timePoint = The time point to check whether this interval is
|
timePoint = The time point to check whether this interval is
|
||||||
before it.
|
before it.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!NegInfInterval!Date(Date(2012, 3, 1)).isBefore(Date(1994, 12, 24)));
|
assert(!NegInfInterval!Date(Date(2012, 3, 1)).isBefore(Date(1994, 12, 24)));
|
||||||
assert(!NegInfInterval!Date(Date(2012, 3, 1)).isBefore(Date(2000, 1, 5)));
|
assert(!NegInfInterval!Date(Date(2012, 3, 1)).isBefore(Date(2000, 1, 5)));
|
||||||
|
@ -23184,7 +23184,7 @@ assert(NegInfInterval!Date(Date(2012, 3, 1)).isBefore(Date(2012, 3, 1)));
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if the given interval is empty
|
$(LREF DateTimeException) if the given interval is empty
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!NegInfInterval!Date(Date(2012, 3, 1)).isBefore(
|
assert(!NegInfInterval!Date(Date(2012, 3, 1)).isBefore(
|
||||||
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))));
|
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))));
|
||||||
|
@ -23211,7 +23211,7 @@ assert(NegInfInterval!Date(Date(2012, 3, 1)).isBefore(
|
||||||
Params:
|
Params:
|
||||||
interval = The interval to check for against this interval.
|
interval = The interval to check for against this interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!NegInfInterval!Date(Date(2012, 3, 1)).isBefore(
|
assert(!NegInfInterval!Date(Date(2012, 3, 1)).isBefore(
|
||||||
PosInfInterval!Date(Date(1999, 5, 4))));
|
PosInfInterval!Date(Date(1999, 5, 4))));
|
||||||
|
@ -23237,7 +23237,7 @@ assert(NegInfInterval!Date(Date(2012, 3, 1)).isBefore(
|
||||||
Params:
|
Params:
|
||||||
interval = The interval to check for against this interval.
|
interval = The interval to check for against this interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!NegInfInterval!Date(Date(2012, 3, 1)).isBefore(
|
assert(!NegInfInterval!Date(Date(2012, 3, 1)).isBefore(
|
||||||
NegInfInterval!Date(Date(1996, 5, 4))));
|
NegInfInterval!Date(Date(1996, 5, 4))));
|
||||||
|
@ -23262,7 +23262,7 @@ assert(!NegInfInterval!Date(Date(2012, 3, 1)).isBefore(
|
||||||
timePoint = The time point to check whether this interval is after
|
timePoint = The time point to check whether this interval is after
|
||||||
it.
|
it.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAfter(Date(1994, 12, 24)));
|
assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAfter(Date(1994, 12, 24)));
|
||||||
assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAfter(Date(2000, 1, 5)));
|
assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAfter(Date(2000, 1, 5)));
|
||||||
|
@ -23289,7 +23289,7 @@ assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAfter(Date(2012, 3, 1)));
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if the given interval is empty.
|
$(LREF DateTimeException) if the given interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAfter(
|
assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAfter(
|
||||||
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))));
|
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))));
|
||||||
|
@ -23319,7 +23319,7 @@ assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAfter(
|
||||||
Params:
|
Params:
|
||||||
interval = The interval to check against this interval.
|
interval = The interval to check against this interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAfter(
|
assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAfter(
|
||||||
PosInfInterval!Date(Date(1999, 5, 4))));
|
PosInfInterval!Date(Date(1999, 5, 4))));
|
||||||
|
@ -23344,7 +23344,7 @@ assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAfter(
|
||||||
Params:
|
Params:
|
||||||
interval = The interval to check against this interval.
|
interval = The interval to check against this interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAfter(
|
assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAfter(
|
||||||
NegInfInterval!Date(Date(1996, 5, 4))));
|
NegInfInterval!Date(Date(1996, 5, 4))));
|
||||||
|
@ -23368,7 +23368,7 @@ assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAfter(
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if the given interval is empty.
|
$(LREF DateTimeException) if the given interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(NegInfInterval!Date(Date(2012, 3, 1)).intersects(
|
assert(NegInfInterval!Date(Date(2012, 3, 1)).intersects(
|
||||||
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))));
|
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))));
|
||||||
|
@ -23395,7 +23395,7 @@ assert(!NegInfInterval!Date(Date(2012, 3, 1)).intersects(
|
||||||
interval = The interval to check for intersection with this
|
interval = The interval to check for intersection with this
|
||||||
interval.
|
interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(NegInfInterval!Date(Date(2012, 3, 1)).intersects(
|
assert(NegInfInterval!Date(Date(2012, 3, 1)).intersects(
|
||||||
PosInfInterval!Date(Date(1999, 5, 4))));
|
PosInfInterval!Date(Date(1999, 5, 4))));
|
||||||
|
@ -23419,7 +23419,7 @@ assert(!NegInfInterval!Date(Date(2012, 3, 1)).intersects(
|
||||||
Params:
|
Params:
|
||||||
interval = The interval to check for intersection with this interval.
|
interval = The interval to check for intersection with this interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(NegInfInterval!Date(Date(2012, 3, 1)).intersects(
|
assert(NegInfInterval!Date(Date(2012, 3, 1)).intersects(
|
||||||
NegInfInterval!Date(Date(1996, 5, 4))));
|
NegInfInterval!Date(Date(1996, 5, 4))));
|
||||||
|
@ -23444,7 +23444,7 @@ assert(NegInfInterval!Date(Date(2012, 3, 1)).intersects(
|
||||||
$(LREF DateTimeException) if the two intervals do not intersect or if
|
$(LREF DateTimeException) if the two intervals do not intersect or if
|
||||||
the given interval is empty.
|
the given interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(NegInfInterval!Date(Date(2012, 3, 1)).intersection(
|
assert(NegInfInterval!Date(Date(2012, 3, 1)).intersection(
|
||||||
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))) ==
|
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))) ==
|
||||||
|
@ -23476,7 +23476,7 @@ assert(NegInfInterval!Date(Date(2012, 3, 1)).intersection(
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if the two intervals do not intersect.
|
$(LREF DateTimeException) if the two intervals do not intersect.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(NegInfInterval!Date(Date(2012, 3, 1)).intersection(
|
assert(NegInfInterval!Date(Date(2012, 3, 1)).intersection(
|
||||||
PosInfInterval!Date(Date(1990, 7, 6))) ==
|
PosInfInterval!Date(Date(1990, 7, 6))) ==
|
||||||
|
@ -23503,7 +23503,7 @@ assert(NegInfInterval!Date(Date(2012, 3, 1)).intersection(
|
||||||
Params:
|
Params:
|
||||||
interval = The interval to intersect with this interval.
|
interval = The interval to intersect with this interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(NegInfInterval!Date(Date(2012, 3, 1)).intersection(
|
assert(NegInfInterval!Date(Date(2012, 3, 1)).intersection(
|
||||||
NegInfInterval!Date(Date(1999, 7, 6))) ==
|
NegInfInterval!Date(Date(1999, 7, 6))) ==
|
||||||
|
@ -23530,7 +23530,7 @@ assert(NegInfInterval!Date(Date(2012, 3, 1)).intersection(
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF DateTimeException) if the given interval is empty.
|
$(LREF DateTimeException) if the given interval is empty.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAdjacent(
|
assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAdjacent(
|
||||||
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))));
|
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))));
|
||||||
|
@ -23560,7 +23560,7 @@ assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAdjacent(
|
||||||
interval = The interval to check whether its adjecent to this
|
interval = The interval to check whether its adjecent to this
|
||||||
interval.
|
interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAdjacent(
|
assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAdjacent(
|
||||||
PosInfInterval!Date(Date(1999, 5, 4))));
|
PosInfInterval!Date(Date(1999, 5, 4))));
|
||||||
|
@ -23585,7 +23585,7 @@ assert(NegInfInterval!Date(Date(2012, 3, 1)).isAdjacent(
|
||||||
interval = The interval to check whether its adjecent to this
|
interval = The interval to check whether its adjecent to this
|
||||||
interval.
|
interval.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAdjacent(
|
assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAdjacent(
|
||||||
NegInfInterval!Date(Date(1996, 5, 4))));
|
NegInfInterval!Date(Date(1996, 5, 4))));
|
||||||
|
@ -23616,7 +23616,7 @@ assert(!NegInfInterval!Date(Date(2012, 3, 1)).isAdjacent(
|
||||||
going from negative infinity to positive infinity
|
going from negative infinity to positive infinity
|
||||||
is not possible.
|
is not possible.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(NegInfInterval!Date(Date(2012, 3, 1)).merge(
|
assert(NegInfInterval!Date(Date(2012, 3, 1)).merge(
|
||||||
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))) ==
|
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))) ==
|
||||||
|
@ -23650,7 +23650,7 @@ assert(NegInfInterval!Date(Date(2012, 3, 1)).merge(
|
||||||
going from negative infinity to positive infinity
|
going from negative infinity to positive infinity
|
||||||
is not possible.
|
is not possible.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(NegInfInterval!Date(Date(2012, 3, 1)).merge(
|
assert(NegInfInterval!Date(Date(2012, 3, 1)).merge(
|
||||||
NegInfInterval!Date(Date(1999, 7, 6))) ==
|
NegInfInterval!Date(Date(1999, 7, 6))) ==
|
||||||
|
@ -23685,7 +23685,7 @@ assert(NegInfInterval!Date(Date(2012, 3, 1)).merge(
|
||||||
going from negative infinity to positive infinity
|
going from negative infinity to positive infinity
|
||||||
is not possible.
|
is not possible.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(NegInfInterval!Date(Date(2012, 3, 1)).span(
|
assert(NegInfInterval!Date(Date(2012, 3, 1)).span(
|
||||||
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))) ==
|
Interval!Date(Date(1990, 7, 6), Date(2000, 8, 2))) ==
|
||||||
|
@ -23723,7 +23723,7 @@ assert(NegInfInterval!Date(Date(1600, 1, 7)).span(
|
||||||
going from negative infinity to positive infinity
|
going from negative infinity to positive infinity
|
||||||
is not possible.
|
is not possible.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(NegInfInterval!Date(Date(2012, 3, 1)).span(
|
assert(NegInfInterval!Date(Date(2012, 3, 1)).span(
|
||||||
NegInfInterval!Date(Date(1999, 7, 6))) ==
|
NegInfInterval!Date(Date(1999, 7, 6))) ==
|
||||||
|
@ -23749,7 +23749,7 @@ assert(NegInfInterval!Date(Date(2012, 3, 1)).span(
|
||||||
Params:
|
Params:
|
||||||
duration = The duration to shift the interval by.
|
duration = The duration to shift the interval by.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto interval1 = NegInfInterval!Date(Date(2012, 4, 5));
|
auto interval1 = NegInfInterval!Date(Date(2012, 4, 5));
|
||||||
auto interval2 = NegInfInterval!Date(Date(2012, 4, 5));
|
auto interval2 = NegInfInterval!Date(Date(2012, 4, 5));
|
||||||
|
@ -23789,7 +23789,7 @@ assert(interval2 == NegInfInterval!Date( Date(2012, 2, 15)));
|
||||||
$(LREF DateTimeException) if empty is true or if the resulting
|
$(LREF DateTimeException) if empty is true or if the resulting
|
||||||
interval would be invalid.
|
interval would be invalid.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto interval1 = NegInfInterval!Date(Date(2012, 3, 1));
|
auto interval1 = NegInfInterval!Date(Date(2012, 3, 1));
|
||||||
auto interval2 = NegInfInterval!Date(Date(2012, 3, 1));
|
auto interval2 = NegInfInterval!Date(Date(2012, 3, 1));
|
||||||
|
@ -23821,7 +23821,7 @@ assert(interval2 == NegInfInterval!Date(Date(2010, 3, 1)));
|
||||||
Params:
|
Params:
|
||||||
duration = The duration to expand the interval by.
|
duration = The duration to expand the interval by.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto interval1 = NegInfInterval!Date(Date(2012, 3, 1));
|
auto interval1 = NegInfInterval!Date(Date(2012, 3, 1));
|
||||||
auto interval2 = NegInfInterval!Date(Date(2012, 3, 1));
|
auto interval2 = NegInfInterval!Date(Date(2012, 3, 1));
|
||||||
|
@ -23857,7 +23857,7 @@ assert(interval2 == NegInfInterval!Date(Date(2012, 2, 28)));
|
||||||
$(LREF DateTimeException) if empty is true or if the resulting
|
$(LREF DateTimeException) if empty is true or if the resulting
|
||||||
interval would be invalid.
|
interval would be invalid.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto interval1 = NegInfInterval!Date(Date(2012, 3, 1));
|
auto interval1 = NegInfInterval!Date(Date(2012, 3, 1));
|
||||||
auto interval2 = NegInfInterval!Date(Date(2012, 3, 1));
|
auto interval2 = NegInfInterval!Date(Date(2012, 3, 1));
|
||||||
|
@ -23931,7 +23931,7 @@ assert(interval2 == NegInfInterval!Date(Date(2010, 3, 1)));
|
||||||
Of course, none of the functions in this module have this problem,
|
Of course, none of the functions in this module have this problem,
|
||||||
so it's only relevant for custom delegates.
|
so it's only relevant for custom delegates.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto interval = NegInfInterval!Date(Date(2010, 9, 9));
|
auto interval = NegInfInterval!Date(Date(2010, 9, 9));
|
||||||
auto func = (in Date date) //For iterating over even-numbered days.
|
auto func = (in Date date) //For iterating over even-numbered days.
|
||||||
|
@ -29264,7 +29264,7 @@ version(StdDdoc)
|
||||||
$(LREF DateTimeException) if the given time zone could not be
|
$(LREF DateTimeException) if the given time zone could not be
|
||||||
found.
|
found.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto tz = TimeZone.getTimeZone("America/Los_Angeles");
|
auto tz = TimeZone.getTimeZone("America/Los_Angeles");
|
||||||
--------------------
|
--------------------
|
||||||
|
@ -32550,7 +32550,7 @@ version(StdDdoc)
|
||||||
$(D func) will run. $(D func) is a unary function that takes a
|
$(D func) will run. $(D func) is a unary function that takes a
|
||||||
$(CXREF time, TickDuration).
|
$(CXREF time, TickDuration).
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
{
|
{
|
||||||
auto mt = measureTime!((TickDuration a)
|
auto mt = measureTime!((TickDuration a)
|
||||||
|
|
|
@ -208,7 +208,7 @@ version(ExampleDigest)
|
||||||
* interface for $(D ubyte) and $(D const(ubyte)[]).
|
* interface for $(D ubyte) and $(D const(ubyte)[]).
|
||||||
* The following usages of $(D put) must work for any type which
|
* The following usages of $(D put) must work for any type which
|
||||||
* passes $(LREF isDigest):
|
* passes $(LREF isDigest):
|
||||||
* Examples:
|
* Example:
|
||||||
* ----
|
* ----
|
||||||
* ExampleDigest dig;
|
* ExampleDigest dig;
|
||||||
* dig.put(cast(ubyte)0); //single ubyte
|
* dig.put(cast(ubyte)0); //single ubyte
|
||||||
|
@ -565,7 +565,7 @@ interface Digest
|
||||||
* Also implements the $(XREF_PACK range,primitives,isOutputRange)
|
* Also implements the $(XREF_PACK range,primitives,isOutputRange)
|
||||||
* interface for $(D ubyte) and $(D const(ubyte)[]).
|
* interface for $(D ubyte) and $(D const(ubyte)[]).
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* ----
|
* ----
|
||||||
* void test(Digest dig)
|
* void test(Digest dig)
|
||||||
* {
|
* {
|
||||||
|
@ -896,7 +896,7 @@ class WrapperDigest(T) if(isDigest!T) : Digest
|
||||||
* The finish function returns the hash value. It takes an optional buffer to copy the data
|
* The finish function returns the hash value. It takes an optional buffer to copy the data
|
||||||
* into. If a buffer is passed, it must have a length at least $(LREF length) bytes.
|
* into. If a buffer is passed, it must have a length at least $(LREF length) bytes.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------
|
* --------
|
||||||
*
|
*
|
||||||
* import std.digest.md;
|
* import std.digest.md;
|
||||||
|
|
|
@ -291,7 +291,7 @@ struct MD5
|
||||||
* Also implements the $(XREF_PACK range,primitives,isOutputRange)
|
* Also implements the $(XREF_PACK range,primitives,isOutputRange)
|
||||||
* interface for $(D ubyte) and $(D const(ubyte)[]).
|
* interface for $(D ubyte) and $(D const(ubyte)[]).
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* ----
|
* ----
|
||||||
* MD5 dig;
|
* MD5 dig;
|
||||||
* dig.put(cast(ubyte)0); //single ubyte
|
* dig.put(cast(ubyte)0); //single ubyte
|
||||||
|
@ -345,7 +345,7 @@ struct MD5
|
||||||
*
|
*
|
||||||
* Generic code which deals with different Digest types should always call start though.
|
* Generic code which deals with different Digest types should always call start though.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------
|
* --------
|
||||||
* MD5 digest;
|
* MD5 digest;
|
||||||
* //digest.start(); //Not necessary
|
* //digest.start(); //Not necessary
|
||||||
|
|
|
@ -447,7 +447,7 @@ struct RIPEMD160
|
||||||
* Also implements the $(XREF_PACK range,primitives,isOutputRange)
|
* Also implements the $(XREF_PACK range,primitives,isOutputRange)
|
||||||
* interface for $(D ubyte) and $(D const(ubyte)[]).
|
* interface for $(D ubyte) and $(D const(ubyte)[]).
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* ----
|
* ----
|
||||||
* RIPEMD160 dig;
|
* RIPEMD160 dig;
|
||||||
* dig.put(cast(ubyte)0); //single ubyte
|
* dig.put(cast(ubyte)0); //single ubyte
|
||||||
|
@ -501,7 +501,7 @@ struct RIPEMD160
|
||||||
*
|
*
|
||||||
* Generic code which deals with different Digest types should always call start though.
|
* Generic code which deals with different Digest types should always call start though.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------
|
* --------
|
||||||
* RIPEMD160 digest;
|
* RIPEMD160 digest;
|
||||||
* //digest.start(); //Not necessary
|
* //digest.start(); //Not necessary
|
||||||
|
@ -517,7 +517,7 @@ struct RIPEMD160
|
||||||
* Returns the finished RIPEMD160 hash. This also calls $(LREF start) to
|
* Returns the finished RIPEMD160 hash. This also calls $(LREF start) to
|
||||||
* reset the internal state.
|
* reset the internal state.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------
|
* --------
|
||||||
* //Simple example
|
* //Simple example
|
||||||
* RIPEMD160 hash;
|
* RIPEMD160 hash;
|
||||||
|
|
|
@ -675,7 +675,7 @@ struct SHA(uint hashBlockSize, uint digestSize)
|
||||||
*
|
*
|
||||||
* Generic code which deals with different Digest types should always call start though.
|
* Generic code which deals with different Digest types should always call start though.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------
|
* --------
|
||||||
* SHA1 digest;
|
* SHA1 digest;
|
||||||
* //digest.start(); //Not necessary
|
* //digest.start(); //Not necessary
|
||||||
|
|
|
@ -2124,7 +2124,7 @@ size_t encode(Tgt, Src, R)(in Src[] s, R range)
|
||||||
Params:
|
Params:
|
||||||
s = the string to be decoded
|
s = the string to be decoded
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------------------------------------------
|
--------------------------------------------------------
|
||||||
string s = "hello world";
|
string s = "hello world";
|
||||||
foreach(c;codePoints(s))
|
foreach(c;codePoints(s))
|
||||||
|
@ -2343,7 +2343,7 @@ abstract class EncodingScheme
|
||||||
* This function allows user-defined subclasses of EncodingScheme to
|
* This function allows user-defined subclasses of EncodingScheme to
|
||||||
* be declared in other modules.
|
* be declared in other modules.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* ----------------------------------------------
|
* ----------------------------------------------
|
||||||
* class Amiga1251 : EncodingScheme
|
* class Amiga1251 : EncodingScheme
|
||||||
* {
|
* {
|
||||||
|
@ -2372,7 +2372,7 @@ abstract class EncodingScheme
|
||||||
* This function is only aware of EncodingSchemes which have been
|
* This function is only aware of EncodingSchemes which have been
|
||||||
* registered with the register() function.
|
* registered with the register() function.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* ---------------------------------------------------
|
* ---------------------------------------------------
|
||||||
* auto scheme = EncodingScheme.create("Amiga-1251");
|
* auto scheme = EncodingScheme.create("Amiga-1251");
|
||||||
* ---------------------------------------------------
|
* ---------------------------------------------------
|
||||||
|
|
|
@ -1521,7 +1521,7 @@ class ErrnoException : Exception
|
||||||
expression, if it does not throw. Otherwise, returns the result of
|
expression, if it does not throw. Otherwise, returns the result of
|
||||||
errorHandler.
|
errorHandler.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
//Revert to a default value upon an error:
|
//Revert to a default value upon an error:
|
||||||
assert("x".to!int().ifThrown(0) == 0);
|
assert("x".to!int().ifThrown(0) == 0);
|
||||||
|
@ -1550,7 +1550,7 @@ class ErrnoException : Exception
|
||||||
be implicitly casted to, and that type will be the type of the compound
|
be implicitly casted to, and that type will be the type of the compound
|
||||||
expression.
|
expression.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
//null and new Object have a common type(Object).
|
//null and new Object have a common type(Object).
|
||||||
static assert(is(typeof(null.ifThrown(new Object())) == Object));
|
static assert(is(typeof(null.ifThrown(new Object())) == Object));
|
||||||
|
|
|
@ -193,7 +193,7 @@ Params:
|
||||||
condition = The condition must be $(D true) for the data to be logged.
|
condition = The condition must be $(D true) for the data to be logged.
|
||||||
args = The data that should be logged.
|
args = The data that should be logged.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
log(LogLevel.warning, true, "Hello World", 3.1415);
|
log(LogLevel.warning, true, "Hello World", 3.1415);
|
||||||
--------------------
|
--------------------
|
||||||
|
@ -238,7 +238,7 @@ Params:
|
||||||
ll = The $(D LogLevel) used by this log call.
|
ll = The $(D LogLevel) used by this log call.
|
||||||
args = The data that should be logged.
|
args = The data that should be logged.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
log(LogLevel.warning, "Hello World", 3.1415);
|
log(LogLevel.warning, "Hello World", 3.1415);
|
||||||
--------------------
|
--------------------
|
||||||
|
@ -283,7 +283,7 @@ Params:
|
||||||
condition = The condition must be $(D true) for the data to be logged.
|
condition = The condition must be $(D true) for the data to be logged.
|
||||||
args = The data that should be logged.
|
args = The data that should be logged.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
log(true, "Hello World", 3.1415);
|
log(true, "Hello World", 3.1415);
|
||||||
--------------------
|
--------------------
|
||||||
|
@ -320,7 +320,7 @@ $(D sharedLog) must be greater or equal to the $(D defaultLogLevel).
|
||||||
Params:
|
Params:
|
||||||
args = The data that should be logged.
|
args = The data that should be logged.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
log("Hello World", 3.1415);
|
log("Hello World", 3.1415);
|
||||||
--------------------
|
--------------------
|
||||||
|
@ -362,7 +362,7 @@ Params:
|
||||||
msg = The $(D printf)-style string.
|
msg = The $(D printf)-style string.
|
||||||
args = The data that should be logged.
|
args = The data that should be logged.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
logf(LogLevel.warning, true, "Hello World %f", 3.1415);
|
logf(LogLevel.warning, true, "Hello World %f", 3.1415);
|
||||||
--------------------
|
--------------------
|
||||||
|
@ -394,7 +394,7 @@ Params:
|
||||||
msg = The $(D printf)-style string.
|
msg = The $(D printf)-style string.
|
||||||
args = The data that should be logged.
|
args = The data that should be logged.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
logf(LogLevel.warning, "Hello World %f", 3.1415);
|
logf(LogLevel.warning, "Hello World %f", 3.1415);
|
||||||
--------------------
|
--------------------
|
||||||
|
@ -425,7 +425,7 @@ Params:
|
||||||
msg = The $(D printf)-style string.
|
msg = The $(D printf)-style string.
|
||||||
args = The data that should be logged.
|
args = The data that should be logged.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
logf(true, "Hello World %f", 3.1415);
|
logf(true, "Hello World %f", 3.1415);
|
||||||
--------------------
|
--------------------
|
||||||
|
@ -451,7 +451,7 @@ Params:
|
||||||
msg = The $(D printf)-style string.
|
msg = The $(D printf)-style string.
|
||||||
args = The data that should be logged.
|
args = The data that should be logged.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
logf("Hello World %f", 3.1415);
|
logf("Hello World %f", 3.1415);
|
||||||
--------------------
|
--------------------
|
||||||
|
@ -516,7 +516,7 @@ Params:
|
||||||
condition = The condition must be $(D true) for the data to be logged.
|
condition = The condition must be $(D true) for the data to be logged.
|
||||||
args = The data that should be logged.
|
args = The data that should be logged.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
trace(1337, "is number");
|
trace(1337, "is number");
|
||||||
info(1337, "is number");
|
info(1337, "is number");
|
||||||
|
@ -589,7 +589,7 @@ Params:
|
||||||
msg = The $(D printf)-style string.
|
msg = The $(D printf)-style string.
|
||||||
args = The data that should be logged.
|
args = The data that should be logged.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
tracef("is number %d", 1);
|
tracef("is number %d", 1);
|
||||||
infof("is number %d", 2);
|
infof("is number %d", 2);
|
||||||
|
@ -612,7 +612,7 @@ Params:
|
||||||
msg = The $(D printf)-style string.
|
msg = The $(D printf)-style string.
|
||||||
args = The data that should be logged.
|
args = The data that should be logged.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
tracef(false, "is number %d", 1);
|
tracef(false, "is number %d", 1);
|
||||||
infof(false, "is number %d", 2);
|
infof(false, "is number %d", 2);
|
||||||
|
@ -928,7 +928,7 @@ abstract class Logger
|
||||||
Params:
|
Params:
|
||||||
args = The data that should be logged.
|
args = The data that should be logged.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto s = new FileLogger(stdout);
|
auto s = new FileLogger(stdout);
|
||||||
s.trace(1337, "is number");
|
s.trace(1337, "is number");
|
||||||
|
@ -975,7 +975,7 @@ abstract class Logger
|
||||||
condition = The condition must be $(D true) for the data to be logged.
|
condition = The condition must be $(D true) for the data to be logged.
|
||||||
args = The data that should be logged.
|
args = The data that should be logged.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto s = new FileLogger(stdout);
|
auto s = new FileLogger(stdout);
|
||||||
s.trace(true, 1337, "is number");
|
s.trace(true, 1337, "is number");
|
||||||
|
@ -1024,7 +1024,7 @@ abstract class Logger
|
||||||
msg = The $(D printf)-style string.
|
msg = The $(D printf)-style string.
|
||||||
args = The data that should be logged.
|
args = The data that should be logged.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto s = new FileLogger(stderr);
|
auto s = new FileLogger(stderr);
|
||||||
s.tracef(true, "is number %d", 1);
|
s.tracef(true, "is number %d", 1);
|
||||||
|
@ -1071,7 +1071,7 @@ abstract class Logger
|
||||||
msg = The $(D printf)-style string.
|
msg = The $(D printf)-style string.
|
||||||
args = The data that should be logged.
|
args = The data that should be logged.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto s = new FileLogger(stderr);
|
auto s = new FileLogger(stderr);
|
||||||
s.tracef("is number %d", 1);
|
s.tracef("is number %d", 1);
|
||||||
|
@ -1144,7 +1144,7 @@ abstract class Logger
|
||||||
|
|
||||||
Returns: The logger used by the logging function as reference.
|
Returns: The logger used by the logging function as reference.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto l = new StdioLogger();
|
auto l = new StdioLogger();
|
||||||
l.log(1337);
|
l.log(1337);
|
||||||
|
@ -1210,7 +1210,7 @@ abstract class Logger
|
||||||
ll = The specific $(D LogLevel) used for logging the log message.
|
ll = The specific $(D LogLevel) used for logging the log message.
|
||||||
args = The data that should be logged.
|
args = The data that should be logged.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto s = new FileLogger(stdout);
|
auto s = new FileLogger(stdout);
|
||||||
s.log(LogLevel.trace, 1337, "is number");
|
s.log(LogLevel.trace, 1337, "is number");
|
||||||
|
@ -1279,7 +1279,7 @@ abstract class Logger
|
||||||
condition = The condition must be $(D true) for the data to be logged.
|
condition = The condition must be $(D true) for the data to be logged.
|
||||||
args = The data that should be logged.
|
args = The data that should be logged.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto s = new FileLogger(stdout);
|
auto s = new FileLogger(stdout);
|
||||||
s.log(true, 1337, "is number");
|
s.log(true, 1337, "is number");
|
||||||
|
@ -1348,7 +1348,7 @@ abstract class Logger
|
||||||
Params:
|
Params:
|
||||||
args = The data that should be logged.
|
args = The data that should be logged.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto s = new FileLogger(stdout);
|
auto s = new FileLogger(stdout);
|
||||||
s.log(1337, "is number");
|
s.log(1337, "is number");
|
||||||
|
@ -1422,7 +1422,7 @@ abstract class Logger
|
||||||
msg = The format string used for this log call.
|
msg = The format string used for this log call.
|
||||||
args = The data that should be logged.
|
args = The data that should be logged.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto s = new FileLogger(stdout);
|
auto s = new FileLogger(stdout);
|
||||||
s.logf(LogLevel.trace, true ,"%d %s", 1337, "is number");
|
s.logf(LogLevel.trace, true ,"%d %s", 1337, "is number");
|
||||||
|
@ -1468,7 +1468,7 @@ abstract class Logger
|
||||||
msg = The format string used for this log call.
|
msg = The format string used for this log call.
|
||||||
args = The data that should be logged.
|
args = The data that should be logged.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto s = new FileLogger(stdout);
|
auto s = new FileLogger(stdout);
|
||||||
s.logf(LogLevel.trace, "%d %s", 1337, "is number");
|
s.logf(LogLevel.trace, "%d %s", 1337, "is number");
|
||||||
|
@ -1515,7 +1515,7 @@ abstract class Logger
|
||||||
msg = The format string used for this log call.
|
msg = The format string used for this log call.
|
||||||
args = The data that should be logged.
|
args = The data that should be logged.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto s = new FileLogger(stdout);
|
auto s = new FileLogger(stdout);
|
||||||
s.logf(true ,"%d %s", 1337, "is number");
|
s.logf(true ,"%d %s", 1337, "is number");
|
||||||
|
@ -1560,7 +1560,7 @@ abstract class Logger
|
||||||
msg = The format string used for this log call.
|
msg = The format string used for this log call.
|
||||||
args = The data that should be logged.
|
args = The data that should be logged.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto s = new FileLogger(stdout);
|
auto s = new FileLogger(stdout);
|
||||||
s.logf("%d %s", 1337, "is number");
|
s.logf("%d %s", 1337, "is number");
|
||||||
|
|
22
std/file.d
22
std/file.d
|
@ -1250,7 +1250,7 @@ unittest
|
||||||
name = The name of the file to get the modification time for.
|
name = The name of the file to get the modification time for.
|
||||||
returnIfMissing = The time to return if the given file does not exist.
|
returnIfMissing = The time to return if the given file does not exist.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
if(timeLastModified(source) >= timeLastModified(target, SysTime.min))
|
if(timeLastModified(source) >= timeLastModified(target, SysTime.min))
|
||||||
{
|
{
|
||||||
|
@ -1571,7 +1571,7 @@ unittest
|
||||||
Throws:
|
Throws:
|
||||||
$(D FileException) if the given file does not exist.
|
$(D FileException) if the given file does not exist.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!"/etc/fonts/fonts.conf".isDir);
|
assert(!"/etc/fonts/fonts.conf".isDir);
|
||||||
assert("/usr/share/include".isDir);
|
assert("/usr/share/include".isDir);
|
||||||
|
@ -1646,7 +1646,7 @@ unittest
|
||||||
Returns:
|
Returns:
|
||||||
true if attibutes specifies a directory
|
true if attibutes specifies a directory
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(!attrIsDir(getAttributes("/etc/fonts/fonts.conf")));
|
assert(!attrIsDir(getAttributes("/etc/fonts/fonts.conf")));
|
||||||
assert(!attrIsDir(getLinkAttributes("/etc/fonts/fonts.conf")));
|
assert(!attrIsDir(getLinkAttributes("/etc/fonts/fonts.conf")));
|
||||||
|
@ -1721,7 +1721,7 @@ bool attrIsDir(uint attributes) @safe pure nothrow @nogc
|
||||||
Throws:
|
Throws:
|
||||||
$(D FileException) if the given file does not exist.
|
$(D FileException) if the given file does not exist.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert("/etc/fonts/fonts.conf".isFile);
|
assert("/etc/fonts/fonts.conf".isFile);
|
||||||
assert(!"/usr/share/include".isFile);
|
assert(!"/usr/share/include".isFile);
|
||||||
|
@ -1789,7 +1789,7 @@ unittest
|
||||||
Returns:
|
Returns:
|
||||||
true if the given file attributes are for a file
|
true if the given file attributes are for a file
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
assert(attrIsFile(getAttributes("/etc/fonts/fonts.conf")));
|
assert(attrIsFile(getAttributes("/etc/fonts/fonts.conf")));
|
||||||
assert(attrIsFile(getLinkAttributes("/etc/fonts/fonts.conf")));
|
assert(attrIsFile(getLinkAttributes("/etc/fonts/fonts.conf")));
|
||||||
|
@ -1962,7 +1962,7 @@ unittest
|
||||||
Returns:
|
Returns:
|
||||||
true if attributes are for a symbolic link
|
true if attributes are for a symbolic link
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
core.sys.posix.unistd.symlink("/etc/fonts/fonts.conf", "/tmp/alink");
|
core.sys.posix.unistd.symlink("/etc/fonts/fonts.conf", "/tmp/alink");
|
||||||
|
|
||||||
|
@ -2515,7 +2515,7 @@ version(StdDdoc)
|
||||||
/++
|
/++
|
||||||
Returns the path to the file represented by this $(D DirEntry).
|
Returns the path to the file represented by this $(D DirEntry).
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto de1 = DirEntry("/etc/fonts/fonts.conf");
|
auto de1 = DirEntry("/etc/fonts/fonts.conf");
|
||||||
assert(de1.name == "/etc/fonts/fonts.conf");
|
assert(de1.name == "/etc/fonts/fonts.conf");
|
||||||
|
@ -2531,7 +2531,7 @@ assert(de2.name == "/usr/share/include");
|
||||||
Returns whether the file represented by this $(D DirEntry) is a
|
Returns whether the file represented by this $(D DirEntry) is a
|
||||||
directory.
|
directory.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto de1 = DirEntry("/etc/fonts/fonts.conf");
|
auto de1 = DirEntry("/etc/fonts/fonts.conf");
|
||||||
assert(!de1.isDir);
|
assert(!de1.isDir);
|
||||||
|
@ -2557,7 +2557,7 @@ assert(de2.isDir);
|
||||||
information about a special file (see the stat man page for more
|
information about a special file (see the stat man page for more
|
||||||
details).
|
details).
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
auto de1 = DirEntry("/etc/fonts/fonts.conf");
|
auto de1 = DirEntry("/etc/fonts/fonts.conf");
|
||||||
assert(de1.isFile);
|
assert(de1.isFile);
|
||||||
|
@ -3581,7 +3581,7 @@ public:
|
||||||
Throws:
|
Throws:
|
||||||
$(D FileException) if the directory does not exist.
|
$(D FileException) if the directory does not exist.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
// Iterate a directory in depth
|
// Iterate a directory in depth
|
||||||
foreach (string name; dirEntries("destroy/me", SpanMode.depth))
|
foreach (string name; dirEntries("destroy/me", SpanMode.depth))
|
||||||
|
@ -3722,7 +3722,7 @@ unittest
|
||||||
Throws:
|
Throws:
|
||||||
$(D FileException) if the directory does not exist.
|
$(D FileException) if the directory does not exist.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
--------------------
|
--------------------
|
||||||
// Iterate over all D source files in current directory and all its
|
// Iterate over all D source files in current directory and all its
|
||||||
// subdirectories
|
// subdirectories
|
||||||
|
|
|
@ -1193,7 +1193,7 @@ private struct DelegateFaker(F)
|
||||||
* Convert a callable to a delegate with the same parameter list and
|
* Convert a callable to a delegate with the same parameter list and
|
||||||
* return type, avoiding heap allocations and use of auxiliary storage.
|
* return type, avoiding heap allocations and use of auxiliary storage.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* ----
|
* ----
|
||||||
* void doStuff() {
|
* void doStuff() {
|
||||||
* writeln("Hello, world.");
|
* writeln("Hello, world.");
|
||||||
|
|
|
@ -4,7 +4,7 @@ Helper functions for working with $(I C strings).
|
||||||
This module is intended to provide fast, safe and garbage free
|
This module is intended to provide fast, safe and garbage free
|
||||||
way to work with $(I C strings).
|
way to work with $(I C strings).
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
---
|
---
|
||||||
version(Posix):
|
version(Posix):
|
||||||
|
|
||||||
|
|
|
@ -1726,7 +1726,7 @@ enum AsciiToken
|
||||||
/*
|
/*
|
||||||
* Returns the maximum of the values in the given array.
|
* Returns the maximum of the values in the given array.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* ---
|
* ---
|
||||||
* assert([1, 2, 3, 4].max == 4);
|
* assert([1, 2, 3, 4].max == 4);
|
||||||
* assert([3, 5, 9, 2, 5].max == 9);
|
* assert([3, 5, 9, 2, 5].max == 9);
|
||||||
|
@ -1761,7 +1761,7 @@ unittest
|
||||||
* Returns the portion of string specified by the $(D_PARAM start) and
|
* Returns the portion of string specified by the $(D_PARAM start) and
|
||||||
* $(D_PARAM length) parameters.
|
* $(D_PARAM length) parameters.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* ---
|
* ---
|
||||||
* assert("abcdef".substr(-1) == "f");
|
* assert("abcdef".substr(-1) == "f");
|
||||||
* assert("abcdef".substr(-2) == "ef");
|
* assert("abcdef".substr(-2) == "ef");
|
||||||
|
@ -1857,7 +1857,7 @@ unittest
|
||||||
* characters, that will be used in the comparison, can be specified. Supports both
|
* characters, that will be used in the comparison, can be specified. Supports both
|
||||||
* case-sensitive and case-insensitive comparison.
|
* case-sensitive and case-insensitive comparison.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* ---
|
* ---
|
||||||
* assert("abc".compareFirstN("abcdef", 3) == 0);
|
* assert("abc".compareFirstN("abcdef", 3) == 0);
|
||||||
* assert("abc".compareFirstN("Abc", 3, true) == 0);
|
* assert("abc".compareFirstN("Abc", 3, true) == 0);
|
||||||
|
@ -1906,7 +1906,7 @@ unittest
|
||||||
* Returns a range consisting of the elements of the $(D_PARAM input) range that
|
* Returns a range consisting of the elements of the $(D_PARAM input) range that
|
||||||
* matches the given $(D_PARAM pattern).
|
* matches the given $(D_PARAM pattern).
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* ---
|
* ---
|
||||||
* assert(equal(["ab", "0a", "cd", "1b"].grep(regex(`\d\w`)), ["0a", "1b"]));
|
* assert(equal(["ab", "0a", "cd", "1b"].grep(regex(`\d\w`)), ["0a", "1b"]));
|
||||||
* assert(equal(["abc", "0123", "defg", "4567"].grep(regex(`(\w+)`), true), ["0123", "4567"]));
|
* assert(equal(["abc", "0123", "defg", "4567"].grep(regex(`(\w+)`), true), ["0123", "4567"]));
|
||||||
|
@ -1941,7 +1941,7 @@ unittest
|
||||||
/*
|
/*
|
||||||
* Pops the last element of the given range and returns the element.
|
* Pops the last element of the given range and returns the element.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* ---
|
* ---
|
||||||
* auto array = [0, 1, 2, 3];
|
* auto array = [0, 1, 2, 3];
|
||||||
* auto result = array.pop();
|
* auto result = array.pop();
|
||||||
|
@ -1975,7 +1975,7 @@ unittest
|
||||||
* Returns the character at the given index as a string. The returned string will be a
|
* Returns the character at the given index as a string. The returned string will be a
|
||||||
* slice of the original string.
|
* slice of the original string.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* ---
|
* ---
|
||||||
* assert("abc".get(1, 'b') == "b");
|
* assert("abc".get(1, 'b') == "b");
|
||||||
* assert("löv".get(1, 'ö') == "ö");
|
* assert("löv".get(1, 'ö') == "ö");
|
||||||
|
|
|
@ -767,7 +767,7 @@ $(D TaskPool) is provided by $(XREF parallelism, taskPool).
|
||||||
|
|
||||||
Returns: A pointer to the $(D Task).
|
Returns: A pointer to the $(D Task).
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
---
|
---
|
||||||
// Read two files into memory at the same time.
|
// Read two files into memory at the same time.
|
||||||
import std.file;
|
import std.file;
|
||||||
|
@ -834,7 +834,7 @@ auto task(alias fun, Args...)(Args args)
|
||||||
Creates a $(D Task) on the GC heap that calls a function pointer, delegate, or
|
Creates a $(D Task) on the GC heap that calls a function pointer, delegate, or
|
||||||
class/struct with overloaded opCall.
|
class/struct with overloaded opCall.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
---
|
---
|
||||||
// Read two files in at the same time again,
|
// Read two files in at the same time again,
|
||||||
// but this time use a function pointer instead
|
// but this time use a function pointer instead
|
||||||
|
@ -1461,7 +1461,7 @@ public:
|
||||||
$(D workUnitSize) should be 1. An overload that chooses a default work
|
$(D workUnitSize) should be 1. An overload that chooses a default work
|
||||||
unit size is also available.
|
unit size is also available.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
---
|
---
|
||||||
// Find the logarithm of every number from 1 to
|
// Find the logarithm of every number from 1 to
|
||||||
// 10_000_000 in parallel.
|
// 10_000_000 in parallel.
|
||||||
|
@ -1785,7 +1785,7 @@ public:
|
||||||
current call to $(D map) will be ignored and the size of the buffer
|
current call to $(D map) will be ignored and the size of the buffer
|
||||||
will be the buffer size of $(D source).
|
will be the buffer size of $(D source).
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
---
|
---
|
||||||
// Pipeline reading a file, converting each line
|
// Pipeline reading a file, converting each line
|
||||||
// to a number, taking the logarithms of the numbers,
|
// to a number, taking the logarithms of the numbers,
|
||||||
|
@ -2087,7 +2087,7 @@ public:
|
||||||
$(D asyncBuf) is useful, for example, when performing expensive operations
|
$(D asyncBuf) is useful, for example, when performing expensive operations
|
||||||
on the elements of ranges that represent data on a disk or network.
|
on the elements of ranges that represent data on a disk or network.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
---
|
---
|
||||||
import std.conv, std.stdio;
|
import std.conv, std.stdio;
|
||||||
|
|
||||||
|
@ -2283,7 +2283,7 @@ public:
|
||||||
|
|
||||||
nBuffers = The number of buffers to cycle through when calling $(D next).
|
nBuffers = The number of buffers to cycle through when calling $(D next).
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
---
|
---
|
||||||
// Fetch lines of a file in a background
|
// Fetch lines of a file in a background
|
||||||
// thread while processing previously fetched
|
// thread while processing previously fetched
|
||||||
|
@ -2717,7 +2717,7 @@ public:
|
||||||
|
|
||||||
This function is useful for maintaining worker-local resources.
|
This function is useful for maintaining worker-local resources.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
---
|
---
|
||||||
// Execute a loop that computes the greatest common
|
// Execute a loop that computes the greatest common
|
||||||
// divisor of every number from 0 through 999 with
|
// divisor of every number from 0 through 999 with
|
||||||
|
@ -2778,7 +2778,7 @@ public:
|
||||||
|
|
||||||
2. Recycling temporary buffers across iterations of a parallel foreach loop.
|
2. Recycling temporary buffers across iterations of a parallel foreach loop.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
---
|
---
|
||||||
// Calculate pi as in our synopsis example, but
|
// Calculate pi as in our synopsis example, but
|
||||||
// use an imperative instead of a functional style.
|
// use an imperative instead of a functional style.
|
||||||
|
|
|
@ -317,7 +317,7 @@ else static assert (0);
|
||||||
the comparison is case sensitive or not. See the
|
the comparison is case sensitive or not. See the
|
||||||
$(LREF filenameCmp) documentation for details.
|
$(LREF filenameCmp) documentation for details.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
---
|
---
|
||||||
assert (baseName("dir/file.ext") == "file.ext");
|
assert (baseName("dir/file.ext") == "file.ext");
|
||||||
assert (baseName("dir/file.ext", ".ext") == "file");
|
assert (baseName("dir/file.ext", ".ext") == "file");
|
||||||
|
@ -2458,7 +2458,7 @@ unittest
|
||||||
|
|
||||||
Returns: Whether a path is absolute or not.
|
Returns: Whether a path is absolute or not.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
On POSIX, an absolute path starts at the root directory.
|
On POSIX, an absolute path starts at the root directory.
|
||||||
(In fact, $(D _isAbsolute) is just an alias for $(LREF isRooted).)
|
(In fact, $(D _isAbsolute) is just an alias for $(LREF isRooted).)
|
||||||
---
|
---
|
||||||
|
@ -3753,7 +3753,7 @@ unittest
|
||||||
if it could not be expanded.
|
if it could not be expanded.
|
||||||
For Windows, $(D expandTilde) merely returns its argument $(D inputPath).
|
For Windows, $(D expandTilde) merely returns its argument $(D inputPath).
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
-----
|
-----
|
||||||
void processFile(string path)
|
void processFile(string path)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1292,7 +1292,7 @@ Signal codes are defined in the $(D core.sys.posix.signal) module
|
||||||
Throws:
|
Throws:
|
||||||
$(LREF ProcessException) on failure.
|
$(LREF ProcessException) on failure.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
See the $(LREF spawnProcess) documentation.
|
See the $(LREF spawnProcess) documentation.
|
||||||
|
|
||||||
See_also:
|
See_also:
|
||||||
|
|
|
@ -6050,7 +6050,7 @@ struct Indexed(Source, Indices)
|
||||||
given logical index. This is useful, for example, when indexing
|
given logical index. This is useful, for example, when indexing
|
||||||
an $(D Indexed) without adding another layer of indirection.
|
an $(D Indexed) without adding another layer of indirection.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
---
|
---
|
||||||
auto ind = indexed([1, 2, 3, 4, 5], [1, 3, 4]);
|
auto ind = indexed([1, 2, 3, 4, 5], [1, 3, 4]);
|
||||||
assert(ind.physicalIndex(0) == 1);
|
assert(ind.physicalIndex(0) == 1);
|
||||||
|
@ -6993,7 +6993,7 @@ If $(D range) does not have length, and $(D popFront) is called when
|
||||||
$(D front.index == Enumerator.max), the index will overflow and
|
$(D front.index == Enumerator.max), the index will overflow and
|
||||||
continue from $(D Enumerator.min).
|
continue from $(D Enumerator.min).
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
Useful for using $(D foreach) with an index loop variable:
|
Useful for using $(D foreach) with an index loop variable:
|
||||||
----
|
----
|
||||||
import std.stdio : stdin, stdout;
|
import std.stdio : stdin, stdout;
|
||||||
|
|
|
@ -261,7 +261,7 @@ import std.exception, std.traits, std.range;
|
||||||
This is an intended form for caching and storage of frequently
|
This is an intended form for caching and storage of frequently
|
||||||
used regular expressions.
|
used regular expressions.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
|
|
||||||
Test if this object doesn't contain any compiled pattern.
|
Test if this object doesn't contain any compiled pattern.
|
||||||
---
|
---
|
||||||
|
|
|
@ -3346,7 +3346,7 @@ int[] abc = cast(int[]) [ EnumMembers!E ];
|
||||||
Cast is not necessary if the type of the variable is inferred. See the
|
Cast is not necessary if the type of the variable is inferred. See the
|
||||||
example below.
|
example below.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
Creating an array of enumerated values:
|
Creating an array of enumerated values:
|
||||||
--------------------
|
--------------------
|
||||||
enum Sqrts : real
|
enum Sqrts : real
|
||||||
|
@ -4519,7 +4519,7 @@ $(D __traits(compiles, ...)) purposes. No actual value is returned.
|
||||||
Note: Trying to use returned value will result in a
|
Note: Trying to use returned value will result in a
|
||||||
"Symbol Undefined" error at link time.
|
"Symbol Undefined" error at link time.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
---
|
---
|
||||||
// Note that `f` doesn't have to be implemented
|
// Note that `f` doesn't have to be implemented
|
||||||
// as is isn't called.
|
// as is isn't called.
|
||||||
|
@ -6044,7 +6044,7 @@ unittest
|
||||||
* $(LI $(D immutable))
|
* $(LI $(D immutable))
|
||||||
* $(LI $(D shared))
|
* $(LI $(D shared))
|
||||||
* )
|
* )
|
||||||
* Examples:
|
* Example:
|
||||||
* ---
|
* ---
|
||||||
* static assert(is(CopyTypeQualifiers!(inout const real, int) == inout const int));
|
* static assert(is(CopyTypeQualifiers!(inout const real, int) == inout const int));
|
||||||
* ---
|
* ---
|
||||||
|
|
|
@ -75,7 +75,7 @@ $(TR $(TDNW UUID namespaces)
|
||||||
* boost._uuid) from the Boost project with some minor additions and API
|
* boost._uuid) from the Boost project with some minor additions and API
|
||||||
* changes for a more D-like API.
|
* changes for a more D-like API.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* ------------------------
|
* ------------------------
|
||||||
* UUID[] ids;
|
* UUID[] ids;
|
||||||
* ids ~= randomUUID();
|
* ids ~= randomUUID();
|
||||||
|
@ -207,7 +207,7 @@ public struct UUID
|
||||||
* format. These 16-ubytes always equal the big-endian structure
|
* format. These 16-ubytes always equal the big-endian structure
|
||||||
* defined in RFC 4122.
|
* defined in RFC 4122.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* -----------------------------------------------
|
* -----------------------------------------------
|
||||||
* auto rawData = uuid.data; //get data
|
* auto rawData = uuid.data; //get data
|
||||||
* rawData[0] = 1; //modify
|
* rawData[0] = 1; //modify
|
||||||
|
@ -330,7 +330,7 @@ public struct UUID
|
||||||
*
|
*
|
||||||
* For a less strict parser, see $(LREF parseUUID)
|
* For a less strict parser, see $(LREF parseUUID)
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* -------------------------
|
* -------------------------
|
||||||
* id = UUID("8AB3060E-2cba-4f23-b74c-b52db3bdfb46");
|
* id = UUID("8AB3060E-2cba-4f23-b74c-b52db3bdfb46");
|
||||||
* assert(id.data == [138, 179, 6, 14, 44, 186, 79, 35, 183, 76,
|
* assert(id.data == [138, 179, 6, 14, 44, 186, 79, 35, 183, 76,
|
||||||
|
|
86
std/xml.d
86
std/xml.d
|
@ -349,7 +349,7 @@ bool isExtender(dchar c)
|
||||||
*
|
*
|
||||||
* Returns: The encoded string
|
* Returns: The encoded string
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* writefln(encode("a > b")); // writes "a > b"
|
* writefln(encode("a > b")); // writes "a > b"
|
||||||
* --------------
|
* --------------
|
||||||
|
@ -434,7 +434,7 @@ enum DecodeMode
|
||||||
*
|
*
|
||||||
* Returns: The decoded string
|
* Returns: The decoded string
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* writefln(decode("a > b")); // writes "a > b"
|
* writefln(decode("a > b")); // writes "a > b"
|
||||||
* --------------
|
* --------------
|
||||||
|
@ -591,7 +591,7 @@ class Document : Element
|
||||||
/**
|
/**
|
||||||
* Compares two Documents for equality
|
* Compares two Documents for equality
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* Document d1,d2;
|
* Document d1,d2;
|
||||||
* if (d1 == d2) { }
|
* if (d1 == d2) { }
|
||||||
|
@ -613,7 +613,7 @@ class Document : Element
|
||||||
* You should rarely need to call this function. It exists so that
|
* You should rarely need to call this function. It exists so that
|
||||||
* Documents can be used as associative array keys.
|
* Documents can be used as associative array keys.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* Document d1,d2;
|
* Document d1,d2;
|
||||||
* if (d1 < d2) { }
|
* if (d1 < d2) { }
|
||||||
|
@ -677,7 +677,7 @@ class Element : Item
|
||||||
* name = the name of the element.
|
* name = the name of the element.
|
||||||
* interior = (optional) the string interior.
|
* interior = (optional) the string interior.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* -------------------------------------------------------
|
* -------------------------------------------------------
|
||||||
* auto element = new Element("title","Serenity")
|
* auto element = new Element("title","Serenity")
|
||||||
* // constructs the element <title>Serenity</title>
|
* // constructs the element <title>Serenity</title>
|
||||||
|
@ -709,7 +709,7 @@ class Element : Item
|
||||||
* Params:
|
* Params:
|
||||||
* item = the item you wish to append.
|
* item = the item you wish to append.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* Element element;
|
* Element element;
|
||||||
* element ~= new Text("hello");
|
* element ~= new Text("hello");
|
||||||
|
@ -727,7 +727,7 @@ class Element : Item
|
||||||
* Params:
|
* Params:
|
||||||
* item = the item you wish to append.
|
* item = the item you wish to append.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* Element element;
|
* Element element;
|
||||||
* element ~= new CData("hello");
|
* element ~= new CData("hello");
|
||||||
|
@ -745,7 +745,7 @@ class Element : Item
|
||||||
* Params:
|
* Params:
|
||||||
* item = the item you wish to append.
|
* item = the item you wish to append.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* Element element;
|
* Element element;
|
||||||
* element ~= new Comment("hello");
|
* element ~= new Comment("hello");
|
||||||
|
@ -763,7 +763,7 @@ class Element : Item
|
||||||
* Params:
|
* Params:
|
||||||
* item = the item you wish to append.
|
* item = the item you wish to append.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* Element element;
|
* Element element;
|
||||||
* element ~= new ProcessingInstruction("hello");
|
* element ~= new ProcessingInstruction("hello");
|
||||||
|
@ -781,7 +781,7 @@ class Element : Item
|
||||||
* Params:
|
* Params:
|
||||||
* item = the item you wish to append.
|
* item = the item you wish to append.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* Element element;
|
* Element element;
|
||||||
* Element other = new Element("br");
|
* Element other = new Element("br");
|
||||||
|
@ -822,7 +822,7 @@ class Element : Item
|
||||||
/**
|
/**
|
||||||
* Compares two Elements for equality
|
* Compares two Elements for equality
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* Element e1,e2;
|
* Element e1,e2;
|
||||||
* if (e1 == e2) { }
|
* if (e1 == e2) { }
|
||||||
|
@ -846,7 +846,7 @@ class Element : Item
|
||||||
* You should rarely need to call this function. It exists so that Elements
|
* You should rarely need to call this function. It exists so that Elements
|
||||||
* can be used as associative array keys.
|
* can be used as associative array keys.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* Element e1,e2;
|
* Element e1,e2;
|
||||||
* if (e1 < e2) { }
|
* if (e1 < e2) { }
|
||||||
|
@ -941,7 +941,7 @@ class Element : Item
|
||||||
/**
|
/**
|
||||||
* Returns the string representation of an Element
|
* Returns the string representation of an Element
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* auto element = new Element("br");
|
* auto element = new Element("br");
|
||||||
* writefln(element.toString()); // writes "<br />"
|
* writefln(element.toString()); // writes "<br />"
|
||||||
|
@ -1023,7 +1023,7 @@ class Tag
|
||||||
* type = (optional) the Tag's type. If omitted, defaults to
|
* type = (optional) the Tag's type. If omitted, defaults to
|
||||||
* TagType.START.
|
* TagType.START.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* auto tag = new Tag("img",Tag.EMPTY);
|
* auto tag = new Tag("img",Tag.EMPTY);
|
||||||
* tag.attr["src"] = "http://example.com/example.jpg";
|
* tag.attr["src"] = "http://example.com/example.jpg";
|
||||||
|
@ -1089,7 +1089,7 @@ class Tag
|
||||||
* You should rarely need to call this function. It exists so that Tags
|
* You should rarely need to call this function. It exists so that Tags
|
||||||
* can be used as associative array keys.
|
* can be used as associative array keys.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* Tag tag1,tag2
|
* Tag tag1,tag2
|
||||||
* if (tag1 == tag2) { }
|
* if (tag1 == tag2) { }
|
||||||
|
@ -1108,7 +1108,7 @@ class Tag
|
||||||
/**
|
/**
|
||||||
* Compares two Tags
|
* Compares two Tags
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* Tag tag1,tag2
|
* Tag tag1,tag2
|
||||||
* if (tag1 < tag2) { }
|
* if (tag1 < tag2) { }
|
||||||
|
@ -1139,7 +1139,7 @@ class Tag
|
||||||
/**
|
/**
|
||||||
* Returns the string representation of a Tag
|
* Returns the string representation of a Tag
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* auto tag = new Tag("book",TagType.START);
|
* auto tag = new Tag("book",TagType.START);
|
||||||
* writefln(tag.toString()); // writes "<book>"
|
* writefln(tag.toString()); // writes "<book>"
|
||||||
|
@ -1171,7 +1171,7 @@ class Tag
|
||||||
/**
|
/**
|
||||||
* Returns true if the Tag is a start tag
|
* Returns true if the Tag is a start tag
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* if (tag.isStart) { }
|
* if (tag.isStart) { }
|
||||||
* --------------
|
* --------------
|
||||||
|
@ -1181,7 +1181,7 @@ class Tag
|
||||||
/**
|
/**
|
||||||
* Returns true if the Tag is an end tag
|
* Returns true if the Tag is an end tag
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* if (tag.isEnd) { }
|
* if (tag.isEnd) { }
|
||||||
* --------------
|
* --------------
|
||||||
|
@ -1191,7 +1191,7 @@ class Tag
|
||||||
/**
|
/**
|
||||||
* Returns true if the Tag is an empty tag
|
* Returns true if the Tag is an empty tag
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* if (tag.isEmpty) { }
|
* if (tag.isEmpty) { }
|
||||||
* --------------
|
* --------------
|
||||||
|
@ -1216,7 +1216,7 @@ class Comment : Item
|
||||||
* Throws: CommentException if the comment body is illegal (contains "--"
|
* Throws: CommentException if the comment body is illegal (contains "--"
|
||||||
* or exactly equals "-")
|
* or exactly equals "-")
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* auto item = new Comment("This is a comment");
|
* auto item = new Comment("This is a comment");
|
||||||
* // constructs <!--This is a comment-->
|
* // constructs <!--This is a comment-->
|
||||||
|
@ -1232,7 +1232,7 @@ class Comment : Item
|
||||||
/**
|
/**
|
||||||
* Compares two comments for equality
|
* Compares two comments for equality
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* Comment item1,item2;
|
* Comment item1,item2;
|
||||||
* if (item1 == item2) { }
|
* if (item1 == item2) { }
|
||||||
|
@ -1251,7 +1251,7 @@ class Comment : Item
|
||||||
* You should rarely need to call this function. It exists so that Comments
|
* You should rarely need to call this function. It exists so that Comments
|
||||||
* can be used as associative array keys.
|
* can be used as associative array keys.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* Comment item1,item2;
|
* Comment item1,item2;
|
||||||
* if (item1 < item2) { }
|
* if (item1 < item2) { }
|
||||||
|
@ -1296,7 +1296,7 @@ class CData : Item
|
||||||
*
|
*
|
||||||
* Throws: CDataException if the segment body is illegal (contains "]]>")
|
* Throws: CDataException if the segment body is illegal (contains "]]>")
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* auto item = new CData("<b>hello</b>");
|
* auto item = new CData("<b>hello</b>");
|
||||||
* // constructs <![CDATA[<b>hello</b>]]>
|
* // constructs <![CDATA[<b>hello</b>]]>
|
||||||
|
@ -1311,7 +1311,7 @@ class CData : Item
|
||||||
/**
|
/**
|
||||||
* Compares two CDatas for equality
|
* Compares two CDatas for equality
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* CData item1,item2;
|
* CData item1,item2;
|
||||||
* if (item1 == item2) { }
|
* if (item1 == item2) { }
|
||||||
|
@ -1330,7 +1330,7 @@ class CData : Item
|
||||||
* You should rarely need to call this function. It exists so that CDatas
|
* You should rarely need to call this function. It exists so that CDatas
|
||||||
* can be used as associative array keys.
|
* can be used as associative array keys.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* CData item1,item2;
|
* CData item1,item2;
|
||||||
* if (item1 < item2) { }
|
* if (item1 < item2) { }
|
||||||
|
@ -1374,7 +1374,7 @@ class Text : Item
|
||||||
* content = the text. This function encodes the text before
|
* content = the text. This function encodes the text before
|
||||||
* insertion, so it is safe to insert any text
|
* insertion, so it is safe to insert any text
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* auto Text = new CData("a < b");
|
* auto Text = new CData("a < b");
|
||||||
* // constructs a < b
|
* // constructs a < b
|
||||||
|
@ -1388,7 +1388,7 @@ class Text : Item
|
||||||
/**
|
/**
|
||||||
* Compares two text sections for equality
|
* Compares two text sections for equality
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* Text item1,item2;
|
* Text item1,item2;
|
||||||
* if (item1 == item2) { }
|
* if (item1 == item2) { }
|
||||||
|
@ -1407,7 +1407,7 @@ class Text : Item
|
||||||
* You should rarely need to call this function. It exists so that Texts
|
* You should rarely need to call this function. It exists so that Texts
|
||||||
* can be used as associative array keys.
|
* can be used as associative array keys.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* Text item1,item2;
|
* Text item1,item2;
|
||||||
* if (item1 < item2) { }
|
* if (item1 < item2) { }
|
||||||
|
@ -1455,7 +1455,7 @@ class XMLInstruction : Item
|
||||||
*
|
*
|
||||||
* Throws: XIException if the segment body is illegal (contains ">")
|
* Throws: XIException if the segment body is illegal (contains ">")
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* auto item = new XMLInstruction("ATTLIST");
|
* auto item = new XMLInstruction("ATTLIST");
|
||||||
* // constructs <!ATTLIST>
|
* // constructs <!ATTLIST>
|
||||||
|
@ -1470,7 +1470,7 @@ class XMLInstruction : Item
|
||||||
/**
|
/**
|
||||||
* Compares two XML instructions for equality
|
* Compares two XML instructions for equality
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* XMLInstruction item1,item2;
|
* XMLInstruction item1,item2;
|
||||||
* if (item1 == item2) { }
|
* if (item1 == item2) { }
|
||||||
|
@ -1489,7 +1489,7 @@ class XMLInstruction : Item
|
||||||
* You should rarely need to call this function. It exists so that
|
* You should rarely need to call this function. It exists so that
|
||||||
* XmlInstructions can be used as associative array keys.
|
* XmlInstructions can be used as associative array keys.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* XMLInstruction item1,item2;
|
* XMLInstruction item1,item2;
|
||||||
* if (item1 < item2) { }
|
* if (item1 < item2) { }
|
||||||
|
@ -1534,7 +1534,7 @@ class ProcessingInstruction : Item
|
||||||
*
|
*
|
||||||
* Throws: PIException if the segment body is illegal (contains "?>")
|
* Throws: PIException if the segment body is illegal (contains "?>")
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* auto item = new ProcessingInstruction("php");
|
* auto item = new ProcessingInstruction("php");
|
||||||
* // constructs <?php?>
|
* // constructs <?php?>
|
||||||
|
@ -1549,7 +1549,7 @@ class ProcessingInstruction : Item
|
||||||
/**
|
/**
|
||||||
* Compares two processing instructions for equality
|
* Compares two processing instructions for equality
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* ProcessingInstruction item1,item2;
|
* ProcessingInstruction item1,item2;
|
||||||
* if (item1 == item2) { }
|
* if (item1 == item2) { }
|
||||||
|
@ -1568,7 +1568,7 @@ class ProcessingInstruction : Item
|
||||||
* You should rarely need to call this function. It exists so that
|
* You should rarely need to call this function. It exists so that
|
||||||
* ProcessingInstructions can be used as associative array keys.
|
* ProcessingInstructions can be used as associative array keys.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* ProcessingInstruction item1,item2;
|
* ProcessingInstruction item1,item2;
|
||||||
* if (item1 < item2) { }
|
* if (item1 < item2) { }
|
||||||
|
@ -1742,7 +1742,7 @@ class ElementParser
|
||||||
* the name, in which case the handler will be called for any unmatched
|
* the name, in which case the handler will be called for any unmatched
|
||||||
* start tag.
|
* start tag.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* // Call this function whenever a <podcast> start tag is encountered
|
* // Call this function whenever a <podcast> start tag is encountered
|
||||||
* onStartTag["podcast"] = (ElementParser xml)
|
* onStartTag["podcast"] = (ElementParser xml)
|
||||||
|
@ -1778,7 +1778,7 @@ class ElementParser
|
||||||
* the name, in which case the handler will be called for any unmatched
|
* the name, in which case the handler will be called for any unmatched
|
||||||
* end tag.
|
* end tag.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* // Call this function whenever a </podcast> end tag is encountered
|
* // Call this function whenever a </podcast> end tag is encountered
|
||||||
* onEndTag["podcast"] = (in Element e)
|
* onEndTag["podcast"] = (in Element e)
|
||||||
|
@ -1811,7 +1811,7 @@ class ElementParser
|
||||||
/**
|
/**
|
||||||
* Register a handler which will be called whenever text is encountered.
|
* Register a handler which will be called whenever text is encountered.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* // Call this function whenever text is encountered
|
* // Call this function whenever text is encountered
|
||||||
* onText = (string s)
|
* onText = (string s)
|
||||||
|
@ -1838,7 +1838,7 @@ class ElementParser
|
||||||
* probably want to use onTextRaw only in circumstances where you
|
* probably want to use onTextRaw only in circumstances where you
|
||||||
* know that decoding is unnecessary.
|
* know that decoding is unnecessary.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* // Call this function whenever text is encountered
|
* // Call this function whenever text is encountered
|
||||||
* onText = (string s)
|
* onText = (string s)
|
||||||
|
@ -1858,7 +1858,7 @@ class ElementParser
|
||||||
* Register a handler which will be called whenever a character data
|
* Register a handler which will be called whenever a character data
|
||||||
* segment is encountered.
|
* segment is encountered.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* // Call this function whenever a CData section is encountered
|
* // Call this function whenever a CData section is encountered
|
||||||
* onCData = (string s)
|
* onCData = (string s)
|
||||||
|
@ -1879,7 +1879,7 @@ class ElementParser
|
||||||
* Register a handler which will be called whenever a comment is
|
* Register a handler which will be called whenever a comment is
|
||||||
* encountered.
|
* encountered.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* // Call this function whenever a comment is encountered
|
* // Call this function whenever a comment is encountered
|
||||||
* onComment = (string s)
|
* onComment = (string s)
|
||||||
|
@ -1900,7 +1900,7 @@ class ElementParser
|
||||||
* Register a handler which will be called whenever a processing
|
* Register a handler which will be called whenever a processing
|
||||||
* instruction is encountered.
|
* instruction is encountered.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* // Call this function whenever a processing instruction is encountered
|
* // Call this function whenever a processing instruction is encountered
|
||||||
* onPI = (string s)
|
* onPI = (string s)
|
||||||
|
@ -1921,7 +1921,7 @@ class ElementParser
|
||||||
* Register a handler which will be called whenever an XML instruction is
|
* Register a handler which will be called whenever an XML instruction is
|
||||||
* encountered.
|
* encountered.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* --------------
|
* --------------
|
||||||
* // Call this function whenever an XML instruction is encountered
|
* // Call this function whenever an XML instruction is encountered
|
||||||
* // (Note: XML instructions may only occur preceding the root tag of a
|
* // (Note: XML instructions may only occur preceding the root tag of a
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* Macros:
|
* Macros:
|
||||||
* WIKI = Phobos/StdZip
|
* WIKI = Phobos/StdZip
|
||||||
*
|
*
|
||||||
* Examples:
|
* Example:
|
||||||
* ---
|
* ---
|
||||||
// Read existing zip file.
|
// Read existing zip file.
|
||||||
import std.digest.crc, std.file, std.stdio, std.zip;
|
import std.digest.crc, std.file, std.stdio, std.zip;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue