Bug 18112 – findSkip example in version 2.78 is not working are expected

Status
RESOLVED
Resolution
INVALID
Severity
minor
Priority
P3
Component
phobos
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2017-12-22T03:11:13Z
Last change time
2018-01-03T01:19:09Z
Assigned to
No Owner
Creator
Vino

Comments

Comment #0 by vino.bheeman — 2017-12-22T03:11:13Z
Hi, The example in the document for findSkip in version 2.078 is not working as expected, throwing compliation error. import std.ascii : isWhite; string s = " abc"; assert(findSkip!isWhite(s) && s == "abc"); assert(!findSkip!isWhite(s) && s == "abc"); s = " "; writeln(findSkip!isWhite(s)); // 2 import std.stdio; s = " "; findSkip!isWhite(s).writeln; From, VIno.B
Comment #1 by greeenify — 2017-12-24T20:00:37Z
The examples are automatically tested and checked, so I assume you are just missing an import? You can always click on the button to the right and open the example with full imports on run.dlang.io
Comment #2 by greensunny12 — 2018-01-03T01:19:09Z
Works fine with dmd-nightly: https://run.dlang.io/is/cjGwip and dmd-beta https://run.dlang.io/is/YKnUqm Did you look at the `master` pages and run the example with an older DMD? You can always run the example in an external editor by clicking on the button "Open in external" on the right side of an example. If you are on the master pages, dmd-nightly will automatically be selected. Closing this as invalid because I can't reproduce this with neither dmd-nightly nor dmd-beta.