CoreFiles by mySites.guru
substr_replace.php24 lines, 600 bytes, from Joomla_3.5.1-Stable-Full_Package.zip
Raw History Compare with 3.5.0
md5
96731403244bc2148579f729d132e1d2
sha1
0faa7d20d739cd7829c995fa41febb3ff109fc72
sha256
557b661022a224359cff5cec1db1290b11f529be74f52244d9c6f0be95dd251f
<?php
/**
* @version $Id$
* @package utf8
* @subpackage strings
*/

//---------------------------------------------------------------
/**
* UTF-8 aware substr_replace.
* Note: requires utf8_substr to be loaded
* @see http://www.php.net/substr_replace
* @see utf8_strlen
* @see utf8_substr
*/
function utf8_substr_replace($str, $repl, $start , $length = NULL ) {
    preg_match_all('/./us', $str, $ar);
    preg_match_all('/./us', $repl, $rar);
    if( $length === NULL ) {
        $length = utf8_strlen($str);
    }
    array_splice( $ar[0], $start, $length, $rar[0] );
    return join('',$ar[0]);
}

The same content is in 87 releases, Joomla 1.7.0 to 3.5.1. See them all, or every version of this file.