You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: replaceWildcards.m
    path of file: ./repos/bspm/thirdparty/rsatoolbox/Engines
    
    the code of the file until where you have to start completion: function varargout = replaceWildcards(stringIn, varargin)
%
% stringOut = replaceWildcards(stringIn[, wildcard1, replacement1, wildcard2, replacement2, ...])
%
% replaceWildcards is a function which takes a string "stringIn" and
% (recursively) replaces all occurrences of {wildcard1, wildcard2, ...} with
% {replacement1, replacement2, ...} until no instances of any wildcards remain.
%
% WARNING: Doing something stupid like setting replacement1 = wildcard1 or any
%          other hilarious recursive replacement set WILL cause this function to

    
function varargout = replaceWildcards(stringIn, varargin)
%
% stringOut = replaceWildcards(stringIn[, wildcard1, replacement1, wildcard2, replacement2, ...])
%
% replaceWildcards is a function which takes a string "stringIn" and
% (recursively) replaces all occurrences of {wildcard1, wildcard2, ...} with
% {replacement1, replacement2, ...} until no instances of any wildcards remain.
%
% WARNING: Doing something stupid like setting replacement1 = wildcard1 or any
%          other hilarious recursive replacement set WILL cause this function to
%          recurse until either MATLAB kills it or your computer crashes.  You
%          have been warned!
%
% Cai Wingfield 5-2010
%__________________________________________________________________________
% Copyright (C) 2010 Medical Research Council

%% Deal with inputs

if mod(numel(varargin), 2) == 0
	nWildCards = numel(varargin)/2;
	for i = 1:nWildCards
		wildCard{i} = varargin{2*i-1};
		mildCard{i} = varargin{2*i};
	end