mirror of
https://github.com/dlang/phobos.git
synced 2025-05-01 15:40:36 +03:00
Improve docs for findAmong().
This commit is contained in:
parent
6ffc326236
commit
8869771682
1 changed files with 15 additions and 4 deletions
|
@ -7794,10 +7794,21 @@ Range findAdjacent(alias pred = "a == b", Range)(Range r)
|
||||||
|
|
||||||
// findAmong
|
// findAmong
|
||||||
/**
|
/**
|
||||||
Advances $(D seq) by calling $(D seq.popFront) until either $(D
|
Searches the given range for an element that matches one of the given choices.
|
||||||
find!(pred)(choices, seq.front)) is $(D true), or $(D seq) becomes
|
|
||||||
empty. Performs $(BIGOH seq.length * choices.length) evaluations of
|
Advances $(D seq) by calling $(D seq.popFront) until either
|
||||||
$(D pred).
|
$(D find!(pred)(choices, seq.front)) is $(D true), or $(D seq) becomes empty.
|
||||||
|
Performs $(BIGOH seq.length * choices.length) evaluations of $(D pred).
|
||||||
|
|
||||||
|
Params:
|
||||||
|
pred = The predicate to use for determining a match.
|
||||||
|
seq = The $(XREF2 range, isInputRange, input range) to search.
|
||||||
|
choices = A $(XREF2 range, isForwardRange, forward range) of possible
|
||||||
|
choices.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
$(D seq) advanced to the first matching element, or until empty if there are no
|
||||||
|
matching elements.
|
||||||
|
|
||||||
See_Also:
|
See_Also:
|
||||||
$(WEB sgi.com/tech/stl/find_first_of.html, STL's find_first_of)
|
$(WEB sgi.com/tech/stl/find_first_of.html, STL's find_first_of)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue