Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51756 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54628 invoked from network); 30 Mar 2011 19:43:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Mar 2011 19:43:01 -0000 Authentication-Results: pb1.pair.com smtp.mail=martin@divbyzero.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=martin@divbyzero.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain divbyzero.net from 87.230.111.147 cause and error) X-PHP-List-Original-Sender: martin@divbyzero.net X-Host-Fingerprint: 87.230.111.147 mx.bauer-kirch.de Linux 2.6 Received: from [87.230.111.147] ([87.230.111.147:55381] helo=mx.bauer-kirch.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C5/80-51004-2C7839D4 for ; Wed, 30 Mar 2011 14:42:59 -0500 Received: by mx.bauer-kirch.de with ESMTP id 1Q51I8-0004vQ-2b; Wed, 30 Mar 2011 21:42:56 +0200 Message-ID: <4D9387BE.4030808@divbyzero.net> Date: Wed, 30 Mar 2011 21:42:54 +0200 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: Dan Birken CC: internals@lists.php.net References: <4D92CC38.5040900@toolpark.com> <004301cbeee8$e54a8280$afdf8780$@com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Adding a more logical string slicing function to PHP From: martin@divbyzero.net (Martin Jansen) 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. Both str_startswith and str_endswith have been suggested in the past: http://marc.info/?t=121647230100001&r=1&w=2 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 - Martin