Actions

API16

JString/str ireplace

From Joomla! Documentation

< API16:JString
Revision as of 17:48, 22 March 2010 by Doxiki (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

UTF-8 aware alternative to str_ireplace Case-insensitive version of str_replace

[Edit Descripton]

Description:JString/str ireplace

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);
        }
}

[Edit See Also] SeeAlso:JString/str ireplace

Examples

<CodeExamplesForm />