Topic: Starts_with vs begins_with


Author: Olaf van der Spek <olafvdspek@gmail.com>
Date: Tue, 7 Jan 2014 03:26:53 -0800 (PST)
Raw View
------=_Part_321_25861158.1389094013703
Content-Type: text/plain; charset=ISO-8859-1

Hi,

The current function name (in the string_view proposal) is starts_with and
I was wondering whether it should be begins_with instead. Ranges have a
begin and an end.
Start matches with stop, not with end.

BTW, is string_view being discussed on another group/list or is there no
discussion? I'd really love to see something like string_view in C++ ASAP.

Greetings,

Olaf

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_321_25861158.1389094013703
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi,<div><br></div><div>The current function name (in the s=
tring_view proposal) is starts_with and I was wondering whether it should b=
e begins_with instead. Ranges have a begin and an end.</div><div>Start matc=
hes with stop, not with end.&nbsp;</div><div><br></div><div>BTW, is string_=
view being discussed on another group/list or is there no discussion? I'd r=
eally love to see something like string_view in C++ ASAP.</div><div><br></d=
iv><div>Greetings,</div><div><br></div><div>Olaf</div></div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_321_25861158.1389094013703--

.


Author: cornedbee@google.com
Date: Wed, 8 Jan 2014 04:56:13 -0800 (PST)
Raw View
------=_Part_5922_31322339.1389185774088
Content-Type: text/plain; charset=ISO-8859-1

On Tuesday, January 7, 2014 12:26:53 PM UTC+1, Olaf van der Spek wrote:
>
> Hi,
>
> The current function name (in the string_view proposal) is starts_with and
> I was wondering whether it should be begins_with instead. Ranges have a
> begin and an end.
> Start matches with stop, not with end.
>
>
starts_with is consistent with Python[1], Java[2], and .Net[3] - it just
seems to be the way most native speakers intuitively think of it.

[1] http://docs.python.org/release/2.5.2/lib/string-methods.html
[2]
http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#startsWith(java.lang.String)
[3] http://msdn.microsoft.com/en-us/library/baketfxw(v=vs.110).aspx

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_5922_31322339.1389185774088
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Tuesday, January 7, 2014 12:26:53 PM UTC+1, Olaf van de=
r Spek wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-le=
ft: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">=
Hi,<div><br></div><div>The current function name (in the string_view propos=
al) is starts_with and I was wondering whether it should be begins_with ins=
tead. Ranges have a begin and an end.</div><div>Start matches with stop, no=
t with end.&nbsp;</div><div><br></div></div></blockquote><div><br></div><di=
v>starts_with is consistent with Python[1], Java[2], and .Net[3] - it just =
seems to be the way most native speakers intuitively think of it.</div><div=
><br></div><div>[1]&nbsp;<a href=3D"http://docs.python.org/release/2.5.2/li=
b/string-methods.html">http://docs.python.org/release/2.5.2/lib/string-meth=
ods.html</a></div><div>[2]&nbsp;<a href=3D"http://docs.oracle.com/javase/7/=
docs/api/java/lang/String.html#startsWith(java.lang.String)">http://docs.or=
acle.com/javase/7/docs/api/java/lang/String.html#startsWith(java.lang.Strin=
g)</a></div><div>[3]&nbsp;<a href=3D"http://msdn.microsoft.com/en-us/librar=
y/baketfxw(v=3Dvs.110).aspx">http://msdn.microsoft.com/en-us/library/baketf=
xw(v=3Dvs.110).aspx</a></div></div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_5922_31322339.1389185774088--

.


Author: Thiago Macieira <thiago@macieira.org>
Date: Wed, 08 Jan 2014 07:21:39 -0800
Raw View
On quarta-feira, 8 de janeiro de 2014 04:56:13, cornedbee@google.com wrote:
> On Tuesday, January 7, 2014 12:26:53 PM UTC+1, Olaf van der Spek wrote:
> > Hi,
> >
> > The current function name (in the string_view proposal) is starts_with and
> > I was wondering whether it should be begins_with instead. Ranges have a
> > begin and an end.
> > Start matches with stop, not with end.
>
> starts_with is consistent with Python[1], Java[2], and .Net[3] - it just
> seems to be the way most native speakers intuitively think of it.
>
> [1] http://docs.python.org/release/2.5.2/lib/string-methods.html
> [2]
> http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#startsWith(ja
> va.lang.String) [3]
> http://msdn.microsoft.com/en-us/library/baketfxw(v=vs.110).aspx

And Qt:

http://qt-project.org/doc/qt-5/qstring.html#startsWith
http://qt-project.org/doc/qt-4.8/qstring.html#startsWith
http://doc.qt.digia.com/3.3/qstring.html#startsWith
http://doc.qt.digia.com/2.3/qstring.html#4a8d17

That's 14 years of precedent right there.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.


Author: Jeffrey Yasskin <jyasskin@google.com>
Date: Wed, 8 Jan 2014 11:16:38 -0800
Raw View
On Tue, Jan 7, 2014 at 3:26 AM, Olaf van der Spek <olafvdspek@gmail.com> wrote:
> Hi,
>
> The current function name (in the string_view proposal) is starts_with

starts_with hasn't been in the string_view proposal since May of last
year: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3685.html.

The not-yet-published version is at
https://rawgithub.com/google/cxx-std-draft/string-ref-paper/string_view.html

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.


Author: Olaf van der Spek <olafvdspek@gmail.com>
Date: Wed, 15 Jan 2014 07:27:39 -0800 (PST)
Raw View
------=_Part_1300_19174517.1389799659796
Content-Type: text/plain; charset=UTF-8

On Wednesday, January 8, 2014 8:16:38 PM UTC+1, Jeffrey Yasskin wrote:
>
> On Tue, Jan 7, 2014 at 3:26 AM, Olaf van der Spek <olafv...@gmail.com<javascript:>>
> wrote:
> > Hi,
> >
> > The current function name (in the string_view proposal) is starts_with
>
> starts_with hasn't been in the string_view proposal since May of last
> year: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3685.html.
>
> The not-yet-published version is at
>
> https://rawgithub.com/google/cxx-std-draft/string-ref-paper/string_view.html
>

Oops, my bad. Regarding remove_prefix/suffix: these names sound string
specific, while such functions might be useful for array_view / range too.
Shouldn't more general names be chosen?

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_1300_19174517.1389799659796
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Wednesday, January 8, 2014 8:16:38 PM UTC+1, Jeffrey Ya=
sskin wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-lef=
t: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">On Tue, Jan 7, 201=
4 at 3:26 AM, Olaf van der Spek &lt;<a href=3D"javascript:" target=3D"_blan=
k" gdf-obfuscated-mailto=3D"2dJz8iZVfocJ" onmousedown=3D"this.href=3D'javas=
cript:';return true;" onclick=3D"this.href=3D'javascript:';return true;">ol=
afv...@gmail.com</a>&gt; wrote:
<br>&gt; Hi,
<br>&gt;
<br>&gt; The current function name (in the string_view proposal) is starts_=
with
<br>
<br>starts_with hasn't been in the string_view proposal since May of last
<br>year: <a href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers/201=
3/n3685.html" target=3D"_blank" onmousedown=3D"this.href=3D'http://www.goog=
le.com/url?q\75http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2F=
papers%2F2013%2Fn3685.html\46sa\75D\46sntz\0751\46usg\75AFQjCNFbS8joD_8w9Dk=
bKawmAx87-xMzsA';return true;" onclick=3D"this.href=3D'http://www.google.co=
m/url?q\75http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpaper=
s%2F2013%2Fn3685.html\46sa\75D\46sntz\0751\46usg\75AFQjCNFbS8joD_8w9DkbKawm=
Ax87-xMzsA';return true;">http://www.open-std.org/jtc1/<wbr>sc22/wg21/docs/=
papers/2013/<wbr>n3685.html</a>.
<br>
<br>The not-yet-published version is at
<br><a href=3D"https://rawgithub.com/google/cxx-std-draft/string-ref-paper/=
string_view.html" target=3D"_blank" onmousedown=3D"this.href=3D'https://www=
..google.com/url?q\75https%3A%2F%2Frawgithub.com%2Fgoogle%2Fcxx-std-draft%2F=
string-ref-paper%2Fstring_view.html\46sa\75D\46sntz\0751\46usg\75AFQjCNGcbh=
KwzT7OnkqetOLUcnEkWlXaBQ';return true;" onclick=3D"this.href=3D'https://www=
..google.com/url?q\75https%3A%2F%2Frawgithub.com%2Fgoogle%2Fcxx-std-draft%2F=
string-ref-paper%2Fstring_view.html\46sa\75D\46sntz\0751\46usg\75AFQjCNGcbh=
KwzT7OnkqetOLUcnEkWlXaBQ';return true;">https://rawgithub.com/google/<wbr>c=
xx-std-draft/string-ref-<wbr>paper/string_view.html</a>
<br></blockquote><div><br></div><div>Oops, my bad. Regarding remove_prefix/=
suffix: these names sound string specific, while such functions might be us=
eful for array_view / range too. Shouldn't more general names be chosen?&nb=
sp;</div></div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_1300_19174517.1389799659796--

.