API16:JString/str ireplace
From Joomla! Documentation
Description
UTF-8 aware alternative to str_ireplace Case-insensitive version of str_replace
Syntax
static str_ireplace($search, $replace, $str, $count=NULL)
| Parameter Name | Default Value | Description |
|---|---|---|
| $search | string to search | |
| $replace | existing string to replace | |
| $str | new string to replace with | |
| $count | NULL | optional count value to be passed by referene |
Defined in
libraries/joomla/utilities/string.php
Importing
jimport( 'joomla.utilities.string' );
Source Body
public static function str_ireplace($search, $replace, $str, $count = NULL)
{
jimport('phputf8.str_ireplace');
if ( $count === FALSE ) {
return utf8_ireplace($search, $replace, $str);
} else {
return utf8_ireplace($search, $replace, $str, $count);
}
}
Examples
Code Examples