On Friday, 14 July 2017 at 17:23:41 UTC, Steven Schveighoffer wrote:

import std.string: representation, assumeUTF;
import std.algorithm: sort;

auto bytes = line.representation.dup;
bytes.sort;
auto result = bytes.assumeUTF; // result is now char[]


Why does it have to be char[]?

 auto bytes = line.representation.dup;
 bytes.sort;
 string result = bytes.assumeUTF;

works too.

Reply via email to