220 32659 <fe3c4197-9cd6-3309-ee7a-1c6b99077081@gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: =?UTF-8?Q?Jonathan_M=c3=bcller?= <jonathanmueller.dev@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: std::string::find implementation
Date: Tue, 30 May 2017 15:37:59 +0200
Lines: 11
Approved: news@gmane.org
Message-ID: <fe3c4197-9cd6-3309-ee7a-1c6b99077081@gmail.com>
References: <82be917c-b3c8-4cb4-bbbc-0f62ec78ce84@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"; format=flowed
X-Trace: blaine.gmane.org 1496151486 1717 195.159.176.226 (30 May 2017 13:38:06 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 30 May 2017 13:38:06 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.1.1
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCUMHC4Z6QGBBOPLWXEQKGQEI7T3TKI@isocpp.org Tue May 30 15:38:02 2017
Return-path: <std-proposals+bncBCUMHC4Z6QGBBOPLWXEQKGQEI7T3TKI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wr0-f199.google.com ([209.85.128.199])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCUMHC4Z6QGBBOPLWXEQKGQEI7T3TKI@isocpp.org>)
	id 1dFhLR-0000AZ-NR
	for gclcip-std-proposals@m.gmane.org; Tue, 30 May 2017 15:37:57 +0200
Original-Received: by mail-wr0-f199.google.com with SMTP id y43sf6749373wrc.11
        for <gclcip-std-proposals@m.gmane.org>; Tue, 30 May 2017 06:38:03 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1496151483; cv=pass;
        d=google.com; s=arc-20160816;
        b=NYpZceZgPaAPyf9xI+BzeWTsKUjhOvaV5vpQNaTcwdyOCD7u2Ei8FujST5r9Fm0lzX
         2vI52vF8066pRFBw1NbGKfBU0X1LxazxnFmmt7TYLutXZ0mfjaVoceuOmY79MB8gxMqP
         TqKTNKaDON3c47Uy4x6FNTj5MwpvAjuUvJQDthve0nTar3QsbOwqOAhM42VP5yysXj2B
         R3+U54/1Q/i01kfIri4v+i3ipciRZ4Z9mhtxJQvv8r0BotyPuFMwNlAEJWXWtfBmfYKz
         7mZ3MUK4k6RAuMvcR/SFIwHqU2gXbht1+PJ7RFBIlW3IdjBBzRxwi0iqGlyaSkcOkd7D
         nG9Q==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:content-language
         :in-reply-to:mime-version:user-agent:date:message-id:from:references
         :to:subject:arc-authentication-results:arc-message-signature
         :dkim-signature:arc-authentication-results;
        bh=f71VUMqyKgfzjQNelVPgWTAi1d/SrufvZCr9EfIJ6h0=;
        b=Gh23a1zrLl90s7en8ujD73v8/Nt9AMQ3MKZYEAD7SdYu1wkNXe1g/Udoydf5UojjW2
         s/srOdX/zECP8VHxhAufOiB6DhiMtU8HnAcYn+qQRyqj3ACzyP6unlfOrva2ujCh5fJP
         bw6I/8gybd8AMnt8inVyVUadjEc+IOzSgId/ZsXxB+1YfmvWXnc9S4qiCaZ7ylsZZ1nt
         E+b1AV5pRZEkzoZuhWgqfRacRdR5V6gpdgzd2xubBS8m2qFChqGX87SmMNhEvkDYfCqK
         ikLRbP3Jbh5gnOlp+zVvqBj5wQnlt2J+L9cf+v8t7T6EEh6HUwlNiGsZ2nx4jLGipR27
         06TQ==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com;
       spf=pass (google.com: domain of jonathanmueller.dev@gmail.com designates 2a00:1450:400c:c0c::241 as permitted sender) smtp.mailfrom=jonathanmueller.dev@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=subject:to:references:from:message-id:date:user-agent:mime-version
         :in-reply-to:content-language:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=f71VUMqyKgfzjQNelVPgWTAi1d/SrufvZCr9EfIJ6h0=;
        b=xK80YjBMfc6yuzbkzar/sgozBvMBWwlqwyr6eQmBkL+R54kydFee6ukvtTekXxxkRI
         hAZImB3xMF2d3956kAXl+6yZroKsUTqmcgGnIXKccYFmDka9BFnZcg8jkoh3v5jn2dBW
         LxA7eFU/VWA60gtaFMJU3+gV5Z7KMig3e8pmR6N2/JFmu/uTzlGiD0n5efB8ZXjisUFs
         YKpa3vGr/0W0X1MTXLxkrPGaOfrl0DahF4RCixY7Jr7wCydzfS6JkusaGckat60aRDrk
         CSmQPnbk2BGnRQEYTzHNzsxiRdpGwgnl2Ce9sbRHuAiBjqe+pE+/worB5Mu5uXsmKBcL
         hKAw= 
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:subject:to:references:from:message-id:date
         :user-agent:mime-version:in-reply-to:content-language
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=f71VUMqyKgfzjQNelVPgWTAi1d/SrufvZCr9EfIJ6h0=;
        b=K31BsqnNu1UFx8cmp0tBSO6Nt7EjVZp2S091eZaY14qGB9DLBYx+NSEcmD1+Bo9SNw
         h6XB9zIvxun0taFP/IVz21eezTR5ZmvOLYlo2fSdiL2gbI2LdC8D7J+deH6R0TtRFKFN
         pbW6sLTgvrS++Yv+2eA7iDiRXBT0YEH+yW3cDzYabI0JtCbV248PkED3cZkqhS7Y0GRa
         nUhY1D0mRz19V9dQlpFsNmJuB7otYDJIp233Il9GDXkp87R7dxTVRweTYprv/vzv8NUQ
         +f1mnCHlbrDuGVkqWUKAvrV298sjMLLddYLJddDTBY6IDz0ziulowwXxXUEkuU07bkQ4
         o 
X-Gm-Message-State: AODbwcCe+zIoZ1ZDgu+NSMPBb6jJqER4FsIeS2x4kW3ESCEERY1B33aE
	Zh1vFvLbaBhVnCUd
X-Received: by 10.28.216.200 with SMTP id p191mr133874wmg.4.1496151482978;
        Tue, 30 May 2017 06:38:02 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.109.154 with SMTP id b26ls218996wmi.17.gmail; Tue, 30 May
 2017 06:38:01 -0700 (PDT)
X-Received: by 10.28.63.9 with SMTP id m9mr1937114wma.87.1496151481424;
        Tue, 30 May 2017 06:38:01 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1496151481; cv=none;
        d=google.com; s=arc-20160816;
        b=sjmUWKDQV711+lYV1/xacHa9vvDYtipf1kfTyjCL0o7flU7KBqQN5xSzHYLAHMvaGw
         EmMB2HC/jJUZ938uBT7a/5NSEWD/vvVC5aFhUbFNf4MmHq574khtgoBhaLiMOQAqU/iM
         2+ON0JMJ0mJwFjX9wOHgTM4p9EbHLi6oDwPqP7ch5c+xq/hIlmzvyz+1JinXq7Ne2JGF
         XZ58PHf4djoh0GVxXzB1sX/2jlMjhaXImfrq3vWiLOeHrLV1dY8GqqFs4nlTXxwXfBlI
         ZZpjliDPMoe49Vh/lIyfKbUHVQyrKyVaA0VW8q0uV+1z6DTWSiP8epTzu4XRu4vD5hRi
         UBzA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-language:content-transfer-encoding:in-reply-to:mime-version
         :user-agent:date:message-id:from:references:to:subject
         :dkim-signature:arc-authentication-results;
        bh=Fl8CYjaczjKe6MF/iOuiGVLwDph6w/rtUCBiF0elexA=;
        b=OnC+VHM03OCxwyOp74J6qZSdR7Wh89eTly7qBdhUH8Xceip7YWxIhndzXan6XnC7xK
         KqjkKsJoCCMHzTyLlCvLRWSJ/R+V5b5XDnvJExlP48gjPvPBxlzMaOwMrZTS4MDYayok
         YJbbCudX96+hJxT52w592+my8U/dWYzC1TRbTWuUVWxq8wyGucP3Z/5UPiA0Kubz1Eer
         3wKYUXh8qRVSeUhoLeTlH6pxQVNXVVRV52ZMfPd+HisbDLrDOmN1zkEP1GkdRWDX4iJX
         jsj2rYGavnRSqMJJBIzX4GoJX8uhg/n6udn9NRxqPAr8d+moOzxvQKaSQMereVgaBoU0
         GoBg==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com;
       spf=pass (google.com: domain of jonathanmueller.dev@gmail.com designates 2a00:1450:400c:c0c::241 as permitted sender) smtp.mailfrom=jonathanmueller.dev@gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Original-Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com. [2a00:1450:400c:c0c::241])
        by mx.google.com with ESMTPS id f123si15266814wme.116.2017.05.30.06.38.01
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 30 May 2017 06:38:01 -0700 (PDT)
Received-SPF: pass (google.com: domain of jonathanmueller.dev@gmail.com designates 2a00:1450:400c:c0c::241 as permitted sender) client-ip=2a00:1450:400c:c0c::241;
Original-Received: by mail-wr0-x241.google.com with SMTP id g76so152710wrd.2
        for <std-proposals@isocpp.org>; Tue, 30 May 2017 06:38:01 -0700 (PDT)
X-Received: by 10.223.161.198 with SMTP id v6mr13781143wrv.135.1496151480872;
        Tue, 30 May 2017 06:38:00 -0700 (PDT)
Original-Received: from [134.61.142.15] (142-015.eduroam.rwth-aachen.de. [134.61.142.15])
        by smtp.gmail.com with ESMTPSA id q98sm8821918wrb.3.2017.05.30.06.37.59
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 30 May 2017 06:38:00 -0700 (PDT)
In-Reply-To: <82be917c-b3c8-4cb4-bbbc-0f62ec78ce84@isocpp.org>
Content-Language: en-US
X-Original-Sender: jonathanmueller.dev@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of
 jonathanmueller.dev@gmail.com designates 2a00:1450:400c:c0c::241 as permitted
 sender) smtp.mailfrom=jonathanmueller.dev@gmail.com;       dmarc=pass (p=NONE
 sp=NONE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:32659
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/32659>

Now with `string_view` this could easily be achieved by taking a 
substring view and searching there. Problem is `std::string::substr()` 
doesn't actually return a view which makes it kind of awkward (have to 
create a view to the whole string, then substr).

-- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/fe3c4197-9cd6-3309-ee7a-1c6b99077081%40gmail.com.

.
