mirror of
https://github.com/dlang/phobos.git
synced 2025-05-07 03:27:03 +03:00
Add the new findSkip overload to the change log
This commit is contained in:
parent
7a2732e4b0
commit
37e3f68e5f
1 changed files with 12 additions and 0 deletions
12
changelog/std-algorithm-searching-findSkip.dd
Normal file
12
changelog/std-algorithm-searching-findSkip.dd
Normal file
|
@ -0,0 +1,12 @@
|
|||
`findSkip` can now skip elements using just a predicate function
|
||||
|
||||
Previously, $(REF findSkip, std, algorithm, searching) could only
|
||||
be used to find a specific string. Now, a new overload allows elements
|
||||
in a range to be skipped over if the passed function returns `true`:
|
||||
|
||||
-------
|
||||
import std.ascii : isWhite;
|
||||
string s = " abc";
|
||||
assert(findSkip!isWhite(s) == 3 && s == "abc");
|
||||
assert(!findSkip!isWhite(s) && s == "abc");
|
||||
-------
|
Loading…
Add table
Add a link
Reference in a new issue