On Thursday, 17 August 2023 at 09:28:05 UTC, Joel wrote:

I get an compile time error with sort after using toLower, putting in array before sort, didn’t work:

    ```d
    void main() {
        Import std;

        "EzraTezla"
            .to!(char[])
            .byCodeUnit
            .map!(std.uni.toLower)
            .sort!"a<b"
            .writeln;
    }
    ```

It works for me. Modifying your code to

```
void main() {
    import std;

    "EzraTezla"
        .to!(char[])
        .byCodeUnit
        .map!(std.uni.toLower)
        .array
        .sort!"a<b"
        .writeln;
}
```

compiles and gives the expected output. https://run.dlang.io/is/85VjiL

Reply via email to