public static function replaceLastOccurrence($search, $replace, $subject)
    {
        $pos = strrpos($subject, $search);

        if($pos !== false)
        {
            $subject = static::mb_substr_replace($subject, $replace, $pos, mb_strlen($search));
        }

        return $subject;
    }