logo
Home XtGem- Templates- XtScript- bottom
XtGemmanual

XtScript functions

str ireplace

Find all occurrences of a case insensitive sub-string within a string and replace them with another sub-string

Syntax

[var $... = ]call str_ireplace $subject=…; $search=…; $replace[=…][...] optional · ... your value

Example

<!--parser:xtscript-->
var $input = foO bar
var $this = oo
var $that = Oo
var $output = call str_ireplace $subject=$input; $search=$this; $replace=$that
print input = $input<br />
print output = $output
<!--/parser:xtscript-->

Copy as text

Output reload

input = foO bar
output = fOo bar

Related

str_replace

XtGem manual · all sections

Powered by XtGem
About us Contact Forum top