note 30899 deleted from function.substr-count by nlopess

From: Date: Tue, 12 Jul 2005 15:12:00 +0000
Subject: note 30899 deleted from function.substr-count by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-91816@lists.php.net to get a copy of this message
Note Submitter: Big daddy Programming ---- 3 is right. It should not return 6. If it is starting from left to right it sees "cgc" then the next character is a "g" so that character is skipped. So the next occurence happens on the next "cgc". As you can see this only happens 3 times. Now you can get 6 if after the first "cgc" you back up a character.

« previous php.notes (#91816) next »