<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif">You are right, the shorter one will exist in the final release. Always the shorter ones.</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">Zhaoxin</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 11, 2016 at 9:50 AM, Jon Hoffman <span dir="ltr">&lt;<a href="mailto:hoffman.jon@gmail.com" target="_blank">hoffman.jon@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Thank you for the reply.  I am pretty sure that you are correct about them being the same when Swift 3 is released.  I am more concerned about which API will be the correct one when Swift 3 is officially released.  My assumption is the Xcode version will be the final one but just wanted to verify it.<div>Thanks</div><span class="HOEnZb"><font color="#888888"><div><br></div></font></span><div><span class="HOEnZb"><font color="#888888">Jon</font></span><div><div class="h5"><br><div><blockquote type="cite"><div>On Jul 10, 2016, at 9:43 PM, Zhao Xin &lt;<a href="mailto:owenzx@gmail.com" target="_blank">owenzx@gmail.com</a>&gt; wrote:</div><br><div><div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif">I think they should be the same when Swift 3 release. You example is just how API will change from Swift 2 to 3. You can file a bug if you want to speed up the changing.</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">Zhaoxin</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 11, 2016 at 6:13 AM, Jon Hoffman via swift-users <span dir="ltr">&lt;<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">With Swift 3.0 Preview 2 for Linux and Xcode Beta 2 for macOS, I see a<br>
difference in the CompareOptions when I use the range(of:option:)<br>
method of the String type.  For example, in Xcode I use this code:<br>
<br>
      if let newMatch = str.range(of: regExFindMatchString, options:<br>
.regularExpression) {<br>
            return str.substring(with: newMatch)<br>
        } else {<br>
            return nil<br>
        }<br>
<br>
notice the .regularExpression.  However in the Linux version I need to<br>
use the .regularExpressionSearch option like this:<br>
<br>
    if let newMatch = str.range(of:regExFindMatchString, options:<br>
.regularExpressionSearch) {<br>
         return str.substring(with: newMatch)<br>
    } else {<br>
         return nil<br>
    }<br>
<br>
<br>
Is it safe to assume that the version that works with Xcode is going<br>
to be the correct version once Swift 3.0 is released?<br>
<br>
Thanks<br>
<br>
Jon<br>
_______________________________________________<br>
swift-users mailing list<br>
<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a><br>
</blockquote></div><br></div>
</div></blockquote></div><br></div></div></div></div></blockquote></div><br></div>