November 13, 2013
https://d.puremagic.com/issues/show_bug.cgi?id=10162



--- Comment #5 from bearophile_hugs@eml.cc 2013-11-13 02:00:59 PST ---
(In reply to comment #3)
> Most of my use cases are to sort a char[]. It's a common operation.

So instead of unrepresentation an alternative solution is to introduce a little std.ascii.asciiSort (it could also be named just std.ascii.sort, or std.algorithm.asciiSort):

char[] s1 = ['t', 'e', 's', 't'];
string t1 = s1.asciiSort;

string s2 = "test";
string t2 = s2.dup.asciiSort.assumeUnique;

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 09, 2014
https://d.puremagic.com/issues/show_bug.cgi?id=10162


Andrei Alexandrescu <andrei@erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrei@erdani.com


--- Comment #6 from Andrei Alexandrescu <andrei@erdani.com> 2014-03-09 10:40:15 PDT ---
I think a function called assumeUTF would be nice. It would convert arrays of (possibly qualified) ubyte, ushort, and uint to the respective arrays of char, wchar, or dchar.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------