logo
Home XtGem- Templates- XtScript- bottom
Find the position of the first occurrence of a case-insensitive substring in a string
[...] = optional ... = your value
[var $... = ]call stripos $haystack=…;$needle=…[;$offset=…]
negative $offset values do not work
Show in textarea
<!--parser:xtscript-->
var $haystack = abefcdefghijklm
var $needle = EF
var $offset = 4
var $position = call stripos $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
Reload
haystack = abefcdefghijklm
needle = EF
offset = 4
position = 6
Powered by XtGem
About us Contact Forum top