substitute with predicate won't compile

H. S. Teoh hsteoh at qfbox.info
Tue Oct 28 22:42:26 UTC 2025


On Tue, Oct 28, 2025 at 09:14:42PM +0000, Bastiaan Veelo via Digitalmars-d-learn wrote:
[...]
> This seems to be a bug. It does work with runtime arguments, but only
> if the predicate is given as a string:
> ```d
>     s = s.substitute!"a.toLower==b.toLower"("&", "&",
>                                             "<", "<",
>                                             ">", ">",
>                                             """, `"`,
>                                             "'", "'").to!string;
> ```
[...]

Hmm. Probably a bug then!


T

-- 
What do you get if you throw a grenade into a French kitchen?  Linoleum blown apart.


More information about the Digitalmars-d-learn mailing list