Another difference, except for theoretical implementation complexity, could be: “set::contains” provides single-element lookup mechanism while the semantics for the proposed “string::contains” is related to a continuous segment of multiple elements with a specific order.

On the other hand, even we could come up with a good name, I think a convincing motivation usually has more priority than concrete design. Therefore, more investigation about motivation around the previous comments may be necessary.

From: Std-Proposals <> on behalf of Giuseppe D'Angelo via Std-Proposals <>
Sent: Friday, May 31, 2019 10:56 PM
Cc: Giuseppe D'Angelo
Subject: Re: [std-proposals] String contains member function
On 31/05/2019 14:31, Ville Voutilainen via Std-Proposals wrote:
> Well, {map,set}::contains is a logarithmic operation, string::contains
> would be linear. That could well be an argument for naming the linear
> operation differently from the logarithmic one.

What about std::unordered_map::contains then?

My 2 c,
Giuseppe D'Angelo | | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53,;;sdata=hHKyQnM2Cv2zu4E4Wq0MEtexUBc85JY9Jf2OD3erMV4%3D&amp;reserved=0
KDAB - The Qt, C++ and OpenGL Experts