note 101324 added to function.strcspn

From: Date: Fri, 10 Dec 2010 03:20:08 +0000
Subject: note 101324 added to function.strcspn
Groups: php.notes 
Request: Send a blank email to php-notes+get-174761@lists.php.net to get a copy of this message
When you use the third parameter remember that the function will return the number of characters it bypassed, which will *not* be the position in your source string. It's a simple fix to just add your third parameter value to the function result to get the position in the first string where the scan stopped, but I didn't think of it at first. ---- Server IP: 69.147.83.197 Probable Submitter: 76.116.14.163 ---- Manual Page -- http://www.php.net/manual/en/function.strcspn.php Edit -- https://master.php.net/note/edit/101324 Del: integrated -- https://master.php.net/note/delete/101324/integrated Del: useless -- https://master.php.net/note/delete/101324/useless Del: bad code -- https://master.php.net/note/delete/101324/bad+code Del: spam -- https://master.php.net/note/delete/101324/spam Del: non-english -- https://master.php.net/note/delete/101324/non-english Del: in docs -- https://master.php.net/note/delete/101324/in+docs Del: other reasons-- https://master.php.net/note/delete/101324 Reject -- https://master.php.net/note/reject/101324 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#174761) next »