ID:               13730
 Updated by:       [EMAIL PROTECTED]
-Reported By:      [EMAIL PROTECTED]
+Reported By:      [EMAIL PROTECTED]
 Status:           Open
 Bug Type:         Feature/Change Request
 Operating System: Linux/Red Hat 7.1
 PHP Version:      4.0.6
 New Comment:

Or make the string position one based instead of zero based so that a
return of 0 can be used for false and any other return is true. 
strstr() can usually be used that way, but seems to get confused
looking for "/".


Previous Comments:
------------------------------------------------------------------------

[2001-10-18 05:42:03] [EMAIL PROTECTED]

re StrPOS, I suggest that you do the following.

Make another function with a different name, e.g. StrFind, that is
1) less problematic in distinguishing between found at pos zero and not
found. e.g. return -1 for not found.
2) case-insensitive, or (better) has an optional parameter
($casesensitive = false) that defaults to false

You could also roll in last-occurence functionality a la strrpos with
option flags

After this, mark the StrPos function as obsolete/deprecated.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=13730&edit=1

Reply via email to