<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hey Joe,</div><div class=""><br class=""></div>The collection index model changed:<div class=""><br class=""></div><div class=""><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0065-collections-move-indices.md" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0065-collections-move-indices.md</a></div><div class=""><br class=""></div><div class="">You now need to ask the collection for the next index:</div><div class=""><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> a = </span><span style="font-variant-ligatures: no-common-ligatures" class="">“Hello, World"</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(112, 61, 170);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> secondIndex = </span><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">a</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">.</span><span style="font-variant-ligatures: no-common-ligatures" class="">characters</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">index</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">(after: </span><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">a</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">.</span><span style="font-variant-ligatures: no-common-ligatures" class="">characters</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">.</span><span style="font-variant-ligatures: no-common-ligatures" class="">startIndex</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">)</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(79, 129, 135);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">print</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">(</span><span style="font-variant-ligatures: no-common-ligatures" class="">a</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">.</span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">characters</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">[</span><span style="font-variant-ligatures: no-common-ligatures" class="">secondIndex</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">])</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(0, 0, 0);" class="">&nbsp;</span><span style="color: rgb(0, 132, 0); font-variant-ligatures: no-common-ligatures;" class="">// prints "e"</span></div></div><div class=""><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">- Dennis</div></div>

</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On May 8, 2016, at 7:58 PM, Joseph Bell via swift-corelibs-dev &lt;<a href="mailto:swift-corelibs-dev@swift.org" class="">swift-corelibs-dev@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Howdy,<div class=""><br class=""></div><div class="">I've been building the latest Swift 3.0 and noticed that between Apr 25 and today that String.CharacterView.Index.advance(by:) is no longer available.</div><div class=""><br class=""></div><div class="">This runs with an Apr 25 build (Swift&nbsp;255544591c to be exact)</div><div class=""><div class="">let string:String = "Hello, world!"</div><div class="">print(string.startIndex)</div><div class="">print(string.startIndex.advanced(by:1))</div></div><div class=""><br class=""></div><div class="">It fails with a build today (May 8, Swift 26fcf1ab4a):</div><div class=""><div class="">test.swift:3:14: error: value of type 'Index' (aka 'String.CharacterView.Index') has no member 'advanced'</div><div class="">print(string.startIndex.advanced(by:1))</div><div class="">&nbsp; &nbsp; &nbsp; ~~~~~~~^~~~~~~~~~ ~~~~~~~~</div></div><div class=""><br class=""></div><div class="">I don't know who runs <a href="http://swiftdoc.org/" class="">swiftdoc.org</a> but it is handy, and shows advanced(by:) a valid method:</div><div class=""><a href="http://swiftdoc.org/v3.0/type/String.CharacterView.Index/" class="">http://swiftdoc.org/v3.0/type/String.CharacterView.Index/</a><br clear="all" class=""><div class=""><br class=""></div><div class="">Not sure what I'm missing here!</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Joe</div><div class=""><br class=""></div><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class="">Joseph Bell<br class=""><div class=""><a href="http://dev.iachieved.it/iachievedit/" target="_blank" class="">http://dev.iachieved.it/iachievedit/</a></div><div class="">@iachievedit</div></div></div></div></div>
</div></div>
_______________________________________________<br class="">swift-corelibs-dev mailing list<br class=""><a href="mailto:swift-corelibs-dev@swift.org" class="">swift-corelibs-dev@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-corelibs-dev<br class=""></div></blockquote></div><br class=""></div></div></body></html>