Re: RFC Posted for str_begins and str_ends functions

From: Date: Tue, 02 Aug 2016 01:36:33 +0000
Subject: Re: RFC Posted for str_begins and str_ends functions
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-94792@lists.php.net to get a copy of this message
Sara Golemon wrote: > Feeling "meh" on it (neither for nor against), but I would consider > consistency with other str*() functions by making case-insensitivity > live in separate functions rather than as a parameter. e.g. > str_begins(), str_ibegins(), str_ends(), end_iends() I guess that "i" isn't appliable when it have slashes. In this case, functions should be: strbegins, stribegins, strends, striends. In all case, I think that is better a third parameter and keep underlined. Yasuo Ohgaki wrote: > +1 for having functions for case insensitivity. > I'm not sure if we should have "s". i.e. str_begin"s". I think that "s" is good here. Sounds better for me, but I don't know if it is right in english. In JS, for instance, we have startsWith. It have a "s" too. 2016-08-01 21:06 GMT-03:00 Yasuo Ohgaki <yohgaki@ohgaki.net>: > On Tue, Aug 2, 2016 at 7:56 AM, Sara Golemon <pollita@php.net> wrote: >> On Mon, Aug 1, 2016 at 3:52 PM, <will@wkhudgins.info> wrote: >>> I recently emailed the group about submitting an RFC for str_begins() and >>> str_ends() functions. The RFC has now been officially submitted and is >>> viewable at: >>> >>> >>> https://wiki.php.net/rfc/add_str_begin_and_end_functions >>> >> Feeling "meh" on it (neither for nor against), but I would consider >> consistency with other str*() functions by making case-insensitivity >> live in separate functions rather than as a parameter. e.g. >> str_begins(), str_ibegins(), str_ends(), end_iends() > > +1 for having functions for case insensitivity. > I'm not sure if we should have "s". i.e. str_begin"s". > > Regards, > > -- > Yasuo Ohgaki > yohgaki@ohgaki.net > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- David Rodrigues

« previous php.internals (#94792) next »