title: How to copy memory to an UnsafeMutableRawPointer starting from an index in Swift?
body: <p>I know how to copy memory from an array to an UnsafeMutableRawPointer starting at index 0 by using:</p>
  
  <pre><code>mutableRawPointer.copyMemory(from: bytes, byteCount: bytes.count * MemoryLayout&lt;Float&gt;.stride)
  </code></pre>
  
  <p>where <code>bytes</code> is an array of floats.</p>
  
  <p>However, I would like to copy from my array to a mutable raw pointer starting from an index that might not be zero.</p>
  
  <p>Eg.:</p>
  
  <pre><code>let array: [Float] = [1, 2, 3]
  
  copyMemoryStartingAtIndex(to: myPointer, from: array, startIndexAtPointer: 2)
  </code></pre>
  
  <p>So, if the pointee was [0, 0, 0, 0, 0], it will become [0, 0, 1, 2, 3].</p>
  
  <p>How can I achieve this in Swift 4?</p>