<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> 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 <<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>> 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. 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 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 <<a href="mailto:owenzx@gmail.com" class="">owenzx@gmail.com</a>> 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=""><<a href="mailto:swift-users@swift.org" target="_blank" class="">swift-users@swift.org</a>></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. For example, in Xcode I use this code:<br class="">
<br class="">
if let newMatch = str.range(of: regExFindMatchString, options:<br class="">
.regularExpression) {<br class="">
return str.substring(with: newMatch)<br class="">
} else {<br class="">
return nil<br class="">
}<br class="">
<br class="">
notice the .regularExpression. However in the Linux version I need to<br class="">
use the .regularExpressionSearch option like this:<br class="">
<br class="">
if let newMatch = str.range(of:regExFindMatchString, options:<br class="">
.regularExpressionSearch) {<br class="">
return str.substring(with: newMatch)<br class="">
} else {<br class="">
return nil<br class="">
}<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>