A case for opImplicitCast: making string search work better

bearophile bearophileHUGS at lycos.com
Fri May 15 15:40:12 PDT 2009


Christopher Wright:
> Just use two functions: find and contains.

Or better, define a built in operator, you may call it "in" :-)

'e' in "hello" => true
(The compiler may even cache the resulting position somewhere, so a successive find can be very fast).

Bye,
bearophile



More information about the Digitalmars-d mailing list