Why do the same work about 'IndexOfAny' and 'indexOf' function?

Tobias Pankrath via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jan 7 08:21:36 PST 2015


On Wednesday, 7 January 2015 at 16:02:25 UTC, bearophile wrote:
> FrankLike:
>
>> But now I want to know in a string (like "hello.exe" or 
>> "hello.a",or "hello.dll" or "hello.lib" ) whether contains any 
>> of them: ["exe","dll","a","lib"].
>
> Seems this:
> http://rosettacode.org/wiki/File_extension_is_in_extensions_list#D
>
> Bye,
> bearophile

Which uses this overload:

size_t canFind(Range, Ranges...)(Range haystack, Ranges needles)


More information about the Digitalmars-d-learn mailing list