https://issues.dlang.org/show_bug.cgi?id=13615

--- Comment #2 from Walter Bright <[email protected]> ---
Better test case:

@safe void foo()
{
    import std.algorithm;

    // Showcase stable sorting
    string[] words = [ "aBc", "a", "abc", "b", "ABC", "c" ];
    sort!("toUpper(a) < toUpper(b)", SwapStrategy.stable)(words);
    assert(words == [ "a", "aBc", "abc", "ABC", "b", "c" ]);
}

--

Reply via email to