substitute with predicate won't compile

Bastiaan Veelo Bastiaan at Veelo.net
Tue Oct 28 19:43:56 UTC 2025


Why doesn't this compile?

```d
import std;

void main()
{
     string s;
     //...
     s = s.substitute!((a, b) => sicmp(a, b) == 0, "&", "&",
                                                   "<", "<",
                                                   ">", ">",
                                                   """, `"`,
                                                   "'", 
"'").array;
}
```

-- Bastiaan.


More information about the Digitalmars-d-learn mailing list