title: Optional Default Parameter in Swift
body: <p>I have a function with default parameters in swift.</p>
  
  <pre><code>func test(string: String = "", middleString: String = "", endString: String = "") -&gt; Void {
    // do stuff
  }
  </code></pre>
  
  <p>I want to pass in variables that will be optional strings.</p>
  
  <pre><code>let string: String? 
  let middleString: String?
  let endString: String?
  </code></pre>
  
  <p>How do I make it so that if the parameters are nil, use the default parameters. 
  If not, then use the values within the optionals.</p>
  
  <p><code>test(string, middleString: middleString, endString: endString)</code></p>