Bug 17525 – std.algorithm.searching.skipOver should have a single argument with pred version
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-06-19T15:14:17Z
Last change time
2018-01-05T13:29:48Z
Assigned to
No Owner
Creator
Jack Stouffer
Comments
Comment #0 by jack — 2017-06-19T15:14:17Z
A la startsWith and endsWith, I should be able to do the following with skipOver
auto s = "\tvalue";
assert(s.skipOver!isWhite.equal("value"));
Comment #1 by razvan.nitu1305 — 2017-07-05T07:44:18Z
skipOver returns a bool value and so do startsWith and endsWith, so you can't equal with "value". But I think that adding an overload to support the construction:
auto s = "\tvalue";
assert(s.skipOver!isWhite && s.equals("value"));
is useful and offers consistency.
Comment #2 by razvan.nitu1305 — 2017-07-05T08:42:04Z