</a>
        
<div class="comment collapse" id="comment-func-replacerange_with_"><div class="p">
    <p>Replace the given <code>subRange</code> of elements with <code>newElements</code>.</p>

<p><strong>Complexity:</strong> O(<code>subRange.count</code>) if <code>subRange.endIndex
  == self.endIndex</code> and <code>newElements.isEmpty</code>, O(N) otherwise.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">mutating func replaceRange&lt;C : CollectionType where C.Generator.Element == _Buff