</code>s starting at zero, and <em>x</em>s are
the elements of <code>base</code>:</p>

<pre><code class="language-swift">&gt; for (n, c) in &quot;Swift&quot;.characters.enumerate() {
    print(&quot;\(n): &#39;\(c)&#39;&quot;)
  }
0: &#39;S&#39;
1: &#39;w&#39;
2: &#39;i&#39;
3: &#39;f&#39;
4: &#39;t&#39;</code></pre>

    <h4>Declaration</h4>    
    <code class="language-swift">func enumerate() -&gt; EnumerateSequence&lt;UnsafeBufferPointerGenerator&lt;Element&gt;&gt;</code>
    
        <h4>Declared In</h