On Friday, 1 May 2020 at 15:17:53 UTC, drug wrote:
01.05.2020 18:04, notna пишет:

hmmm, whích results in:
  Error: cannot use [] operator on expression of type dchar


try this:
```D
import std;
void main()
{
    string word = "Привет";
dchar[] line3 = to!(dchar[])(word.dup) // make a copy to get a range of mutable char // and convert char to dchar
        .sort                              // sort it
.release; // get the sorted range
    assert(line3 == "Пвеирт");
}
```

THANKS, this looks even cleaner :)

Reply via email to