Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

strpos in python

pos = haystack.find(needle)
pos = haystack.find(needle, offset)
//returns -1 when not found:

pos = haystack.index(needle)
pos = haystack.index(needle, offset)
//raises ValueError when not found:

//Also can be used to compare
if needle in haystack:
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #strpos #python
ADD COMMENT
Topic
Name
8+6 =