sort(charArray) doesn't work

Andrea Fontana nospam at example.com
Wed Nov 13 03:03:39 PST 2013


On Wednesday, 13 November 2013 at 10:32:19 UTC, Uplink_Coder 
wrote:
> sort doesn't work on an primitive Array ?
> Is that normal ....
> please look @http://www.dpaste.dzfl.pl/961286e1
> because I don't know what i'm doing worng
>
> Thanks in Advance :D

By the way:

return sort(vars); //sort return a range i think, not a char[];

Maybe you want to do:

return vars.sort;  // (not sort in std.algorithms)

or:

import std.array;
...

auto getAllVariables (Pair[][] parsedSysten)  // Auto instead of 
char[]
...
...
return sort(vars.array);  // vars.array


I'm not sure why sort(vars) doesn't work...


More information about the Digitalmars-d-learn mailing list