mirror of
https://github.com/dlang/phobos.git
synced 2025-04-28 22:21:09 +03:00
Merged master into branch with changes for std.string.
This commit is contained in:
commit
fabd38658f
11 changed files with 348 additions and 174 deletions
|
@ -3310,10 +3310,10 @@ unittest
|
|||
* Example:
|
||||
----
|
||||
string s = "abcdef";
|
||||
assert(findSkip("abcdef", "cd") && s == "ef");
|
||||
assert(findSkip(s, "cd") && s == "ef");
|
||||
s = "abcdef";
|
||||
assert(!findSkip("abcdef", "cxd") && s == "abcdef");
|
||||
assert(findSkip("abcdef", "def") && s.empty);
|
||||
assert(!findSkip(s, "cxd") && s == "abcdef");
|
||||
assert(findSkip(s, "def") && s.empty);
|
||||
----
|
||||
*/
|
||||
bool findSkip(alias pred = "a == b", R1, R2)(ref R1 haystack, R2 needle)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue