private static function replaceByPosition(string $subject, string $replace, $position, string $search): string
    {
        if ($position !== false) {
            return \substr_replace($subject, $replace, $position, \mb_strlen($search));
        }

        return $subject;
    }