View source code
							
							
						
								Display the source code in std/algorithm/searching.d from which this
								page was generated on github.
							
						
							Report a bug
							
						
								If you spot a problem with this page, click here to create a
								Bugzilla issue.
							
						
							
								Improve this page
							
							
					
								Quickly fork, edit online, and submit a pull request for this page.
								Requires a signed-in GitHub account. This works well for small changes.
								If you'd like to make larger changes you may want to consider using
								local clone.
							
						Function std.algorithm.searching.findSkip
Finds needle in haystack and positions haystack
 right after the first occurrence of needle.
						
				bool findSkip(alias pred, R1, R2)
				(
				
				  ref R1 haystack,
				
				  R2 needle
				
				)
				
				if (isForwardRange!R1 && isForwardRange!R2 && is(typeof(binaryFun!pred(haystack
				
				size_t findSkip(alias pred, R1)
				(
				
				  ref R1 haystack
				
				)
				
				if (isForwardRange!R1 && ifTestable!(typeof(haystack
				If no needle is provided, the haystack is advanced as long as pred
 evaluates to true.
 Similarly, the haystack is positioned so as pred evaluates to false for
 haystack.
Parameters
| Name | Description | 
|---|---|
| haystack | The forward range to search in. | 
| needle | The forward range to search for. | 
| pred | Custom predicate for comparison of haystack and needle | 
Returns
true if the needle was found, in which case haystack is
 positioned after the end of the first occurrence of needle; otherwise
 false, leaving haystack untouched. If no needle is provided, it returns
  the number of times pred(haystack returned true.
See Also
Example
import stdExample
import stdAuthors
License
					Copyright © 1999-2022 by the D Language Foundation | Page generated by ddox.