Why std.algorithm.sort can't be applied to char[]?
monarch_dodra via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu May 15 08:34:09 PDT 2014
On Wednesday, 14 May 2014 at 09:01:23 UTC, John Colvin wrote:
> Why would anyone ever want to sort code-points?
Why not? To remove duplicate characters?
> They might want to sort graphemes, but that's difficult to do
> in-place (needs O(n) memory, I think...). If out-of-place is
> good enough
>
> someStr.byGrapheme.array.sort();
The current "status quo" in D is that a dchar basically
represents a character.
More information about the Digitalmars-d-learn
mailing list