<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Feel free to file issues for us at <a href="http://bugs.swift.org" class="">bugs.swift.org</a>&nbsp;when you find these kinds of things. Since we have two different source code bases for these APIs, we need to find and fix these kinds of mismatches. This year has had a lot of renaming, so hopefully once we get them all done we should be good to go in the future.<div class=""><br class=""></div><div class="">- Tony</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jul 10, 2016, at 6:50 PM, Jon Hoffman via swift-users &lt;<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Thank you for the reply. &nbsp;I am pretty sure that you are correct about them being the same when Swift 3 is released. &nbsp;I am more concerned about which API will be the correct one when Swift 3 is officially released. &nbsp;My assumption is the Xcode version will be the final one but just wanted to verify it.<div class="">Thanks</div><div class=""><br class=""></div><div class="">Jon<br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jul 10, 2016, at 9:43 PM, Zhao Xin &lt;<a href="mailto:owenzx@gmail.com" class="">owenzx@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><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 class=""></div><div class="gmail_default" style="font-family:georgia,serif">Zhaoxin</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Jul 11, 2016 at 6:13 AM, Jon Hoffman via swift-users <span dir="ltr" class="">&lt;<a href="mailto:swift-users@swift.org" target="_blank" class="">swift-users@swift.org</a>&gt;</span> wrote:<br class=""><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 class="">
difference in the CompareOptions when I use the range(of:option:)<br class="">
method of the String type.&nbsp; For example, in Xcode I use this code:<br class="">
<br class="">
&nbsp; &nbsp; &nbsp; if let newMatch = str.range(of: regExFindMatchString, options:<br class="">
.regularExpression) {<br class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return str.substring(with: newMatch)<br class="">
&nbsp; &nbsp; &nbsp; &nbsp; } else {<br class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return nil<br class="">
&nbsp; &nbsp; &nbsp; &nbsp; }<br class="">
<br class="">
notice the .regularExpression.&nbsp; However in the Linux version I need to<br class="">
use the .regularExpressionSearch option like this:<br class="">
<br class="">
&nbsp; &nbsp; if let newMatch = str.range(of:regExFindMatchString, options:<br class="">
.regularExpressionSearch) {<br class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return str.substring(with: newMatch)<br class="">
&nbsp; &nbsp; } else {<br class="">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return nil<br class="">
&nbsp; &nbsp; }<br class="">
<br class="">
<br class="">
Is it safe to assume that the version that works with Xcode is going<br class="">
to be the correct version once Swift 3.0 is released?<br class="">
<br class="">
Thanks<br class="">
<br class="">
Jon<br class="">
_______________________________________________<br class="">
swift-users mailing list<br class="">
<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-users</a><br class="">
</blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">swift-users mailing list<br class=""><a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-users<br class=""></div></blockquote></div><br class=""></div></body></html>