note 45142 added to function.mb-strcut

From: Date: Fri, 27 Aug 2004 11:01:54 +0000
Subject: note 45142 added to function.mb-strcut
Groups: php.notes 
Request: Send a blank email to php-notes+get-75414@lists.php.net to get a copy of this message
What the manual and the first commenter are trying to say is that mb_strcut uses byte offsets, as opposed to mb_substr which uses character offsets. Both mb_strcut and mb_substr appear to treat negative and out-of-range offsets and lengths in the basically the same way as substr. An exception is that if start is too large, an empty string will be returned rather than FALSE. Testing indicates that mb_strcut first works out start and end byte offsets, then moves each offset left to the nearest character boundary. ---- Manual Page -- http://www.php.net/manual/en/function.mb-strcut.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+45142 Delete -- http://master.php.net/manage/user-notes.php?action=delete+45142&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+45142&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#75414) next »