Home
XtGem-
Templates-
XtScript-
Translate this page
Unavailable
Microsoft
®
Translator
Check out this page in {0} translated from {1}
translated from
Original:
Translated:
Automatic translation powered by Microsoft® Translator
Start translating
Stop translating
Close
Close and show original page
Select
Main Index
Predefined Functions
Scripts
Xtforum post
Short Url
strripos
Find the position of the last occurrence of a case-insensitive substring in a string
[...] = optional ... = your value
[var $... = ]call strripos $haystack=…;$needle=…[;$offset=…]
negative
$offset
values count from the end of
$haystack
positive
$offset
values count from the start of
$haystack
Example code
Show as text
<!--parser:xtscript--> # Needle is at positions 2 and 15 var $haystack = abcdefghijklmabcdefghijklm var $needle = CDE var $offset = 0 var $position = call strripos $haystack=$haystack; $needle=$needle; $offset=$offset ; print haystack = $haystack<br /> print needle = $needle<br /> print offset = $offset<br /> print position = $position<hr /> var $offset = -12 var $position = call strripos $haystack=$haystack; $needle=$needle; $offset=$offset ; print haystack = $haystack<br /> print needle = $needle<br /> print offset = $offset<br /> print position= $position<hr /> <!--/parser:xtscript-->
Show as text
Example output
Reload
haystack = abcdefghijklmabcdefghijklm
needle = CDE
offset = 0
position = 15
haystack = abcdefghijklmabcdefghijklm
needle = CDE
offset = -12
position= 2
Related pages
stripos
stristr
strpos
strrchr
strrpos
strstr
substr
Quick index
abs
addslashes
base64_decode
base64_encode
bin2hex
br2nl
ceil
chr
crc32
dechex
floor
hex2bin
hexdec
htmlspecialchars
lcfirst
ltrim
md5
mt_rand
nl2br
ord
pi
pow
rawurldecode
rawurlencode
round
rtrim
sha1
str_ireplace
str_pad
str_repeat
str_replace
str_shuffle
strip_tags
stripos
stripslashes
stristr
strlen
strpos
strrchr
strrev
strripos
strrpos
strstr
strtolower
strtoupper
substr
trim
ucfirst
ucwords
urldecode
urlencode
About us
Contact
Forum