Should this work?
Jakob Ovrum
jakobovrum at gmail.com
Sat Jan 25 13:13:15 PST 2014
On Saturday, 25 January 2014 at 09:18:24 UTC, Manu wrote:
> On 24 January 2014 21:49, Regan Heath <regan at netmail.co.nz>
> wrote:
>
>> On Fri, 24 Jan 2014 08:21:12 -0000, Jacob Carlborg
>> <doob at me.com> wrote:
>>
>>> I would expect "contains" to take a element and check if it
>>> exists in the
>>> range.
>>>
>>
>> Except in the case of string, where we also want an overload
>> taking more
>> than a single element aka a substring.
>
>
> A great example of when the string function should not be
> conflated with
> the general function.
Both `find` and `canFind` support subrange search, and that works
with any range, not just substrings.
More information about the Digitalmars-d
mailing list