Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51764 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85577 invoked from network); 31 Mar 2011 14:41:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Mar 2011 14:41:12 -0000 Authentication-Results: pb1.pair.com header.from=philip@roshambo.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=philip@roshambo.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain roshambo.org from 209.85.161.170 cause and error) X-PHP-List-Original-Sender: philip@roshambo.org X-Host-Fingerprint: 209.85.161.170 mail-gx0-f170.google.com Received: from [209.85.161.170] ([209.85.161.170:37196] helo=mail-gx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6E/32-04048-682949D4 for ; Thu, 31 Mar 2011 09:41:10 -0500 Received: by gxk27 with SMTP id 27so1139524gxk.29 for ; Thu, 31 Mar 2011 07:41:07 -0700 (PDT) Received: by 10.101.72.10 with SMTP id z10mr1990351ank.129.1301582467695; Thu, 31 Mar 2011 07:41:07 -0700 (PDT) Received: from [172.20.10.2] ([166.205.10.84]) by mx.google.com with ESMTPS id w39sm1243885ana.39.2011.03.31.07.41.04 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 31 Mar 2011 07:41:05 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii In-Reply-To: <4D9387BE.4030808@divbyzero.net> Date: Thu, 31 Mar 2011 08:41:02 -0600 Cc: Dan Birken , internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: References: <4D92CC38.5040900@toolpark.com> <004301cbeee8$e54a8280$afdf8780$@com> <4D9387BE.4030808@divbyzero.net> To: Martin Jansen X-Mailer: Apple Mail (2.1082) Subject: Re: [PHP-DEV] Adding a more logical string slicing function to PHP From: philip@roshambo.org (Philip Olson) On Mar 30, 2011, at 1:42 PM, Martin Jansen wrote: > On 30.03.11 21:36, Dan Birken wrote: >> As for adding other string functions, I agree, I think there are a = lot of >> them that would be great to add. starts_with & ends_with for sure. >=20 > Both str_startswith and str_endswith have been suggested in the past: >=20 > http://marc.info/?t=3D121647230100001&r=3D1&w=3D2 >=20 > I recently got around to merge them into a largely unfinished = extension > so they are archived somewhere safe: https://github.com/mj/php-ext-str I see str_contains() on the TODO there. I've always wanted in_string() = so am glad to see a similar item. Using strpos() for this task feels = dirty, much like using arrpos() for arrays would ;) Regards, Philip=