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.skipOver.skipOver

r1 = The forward range to move forward. r2 = The input range representing the initial segment of r1 to skip over. e = The element to match.

bool skipOver(R1, R2) (
  ref R1 r1,
  R2 r2
)
if (is(typeof(binaryFun!pred(r1.front, r2.front))) && isForwardRange!R1 && isInputRange!R2);

bool skipOver(R) (
  ref R r1
)
if (isForwardRange!R && ifTestable!(typeof(r1.front), unaryFun!pred));

bool skipOver(R, E) (
  ref R r,
  E e
)
if (is(typeof(binaryFun!pred(r.front, e))) && isInputRange!R);

Returns

true if the initial segment of r1 matches r2 or pred evaluates to true, and r1 has been advanced to the point past this segment; otherwise false, and r1 is left in its original position.

Authors

Andrei Alexandrescu

License

Boost License 1.0.