public static function replaceFirst($search, $replace, $subject)
    {
        if ($search == '') {
            return $subject;
        }

        $position = mb_strpos($subject, $search);

        if ($position !== false) {
            return mb_substr($subject, 0, $position).$replace.mb_substr($subject, $position + mb_strlen($search));
        }

        return $subject;
    }