Newsgroups: php.i18n,php.internals Path: news.php.net Xref: news.php.net php.i18n:1015 php.internals:24200 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93331 invoked by uid 1010); 23 Jun 2006 21:01:56 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 93314 invoked from network); 23 Jun 2006 21:01:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jun 2006 21:01:55 -0000 X-PHP-List-Original-Sender: andrei@gravitonic.com X-Host-Fingerprint: 204.11.219.139 lerdorf.com Linux 2.5 (sometimes 2.4) (4) Received: from ([204.11.219.139:54049] helo=lerdorf.com) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id DF/8F-02438-0C65C944 for ; Fri, 23 Jun 2006 17:01:54 -0400 Received: from [66.228.175.145] (borndress-lm.corp.yahoo.com [66.228.175.145]) (authenticated bits=0) by lerdorf.com (8.13.7/8.13.7/Debian-1) with ESMTP id k5NL1nVx002191; Fri, 23 Jun 2006 14:01:49 -0700 Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-ID: <23ead5a35bff30e24f93045de3db6638@gravitonic.com> Content-Transfer-Encoding: 7bit Cc: PHP Internals Date: Fri, 23 Jun 2006 14:00:57 -0700 To: PHP I18N X-Mailer: Apple Mail (2.623) Subject: TextIterator changes From: andrei@gravitonic.com (Andrei Zmievski) I am working on implementing BreakIterator API [1]. I considered two approaches: making a separate class or merging the API into the existing TextIterator. Having a separate class would be a bit cleaner, but I can see people wanting to use it in foreach(), and since TextIterator already provides a lot of BreakIterator's functionality, I decided that merging would be the best option. However, there is an overlap between the BreakIterator API and the current TextIterator one, so there will have to be some changes. 1. TextIterator::current() signature will change from: mixed current() to: mixed current(integer &$offset) in order to support BreakIterator's functionality of returning offset in current(). 2. TextIterator::next() will return the offset of the next boundary instead of returning nothing. 3. TextIterator::rewind() will be renamed to TextIterator::first() to conform to BreakIterator's first()/last() API. So this is heads up. Let me know if you have a problem with this. -A [1] http://icu.sourceforge.net/apiref/icu4c/ubrk_8h.html