strpos
Find the position of the first occurrence of a substring in a string
[...] = optional ... = your value
[var $... = ]call strpos $haystack=…;$needle=…[;$offset=…]
negative $offset values do not work
Example code
Show in textarea<!--parser:xtscript-->
var $haystack = abefcdefghijklmnopqrstuvwxyz
var $needle = op
var $offset = 0
var $position = call strpos $haystack=$haystack; $needle=$needle; $offset=$offset ;
print haystack = $haystack<br />
print needle = $needle <br />
print offset = $offset <br />
print position = $position
<!--/parser:xtscript-->
Show in textarea Example output
Reloadhaystack = abefcdefghijklmnopqrstuvwxyz
needle = op
offset = 0
position = 16