On Monday, 21 October 2013 at 15:12:36 UTC, Chris wrote:
The following code compiles:

import std.stdio;

void main() {

        auto text = "Hello world!";
        if (!std.algorithm.endsWith(text, "!" ".")) {
                writeln("No punctuation!");
        } else {
                writeln("Has punctuation");
        }
}

The bug is in line 6 a missing comma between "!" and ".":

!std.algorithm.endsWith(text, "!" ".")

If you insert the comma, it will behave as expected.

Is this ok or a bug?

It's a feature.

Reply via email to