note 41627 deleted from function.strpos by nlopess
| From: | nlopess@php.net | Date: | Sat, 17 Apr 2004 10:49:35 +0000 |
| Subject: | note 41627 deleted from function.strpos by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-68243@lists.php.net to get a copy of this message | ||
Note Submitter: arjini@mac.com
----
Some may find this off topic, but this is strpos for javascript:
function strpos(s,c){
for(i=0;i<s.length;i++){
if(s.substring(i,i+1)==c)
return i;
else
return
false;
}
}
Wrote that because JS regexes were driving me nuts, and I just wanted to write PHP, but
couldn't.