<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="">The range(of:options:range:locale:) method of StringProtocol does not accept a partial range as search range. Example (Xcode 9, Swift 4):<br class=""><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""> <span style="color: #ba2da2" class="">let</span> str = <span style="color: #d12f1b" class="">"foo"</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""> <span style="color: #ba2da2" class="">le</span><span style="text-decoration: underline ; color: #ba2da2" class="">t</span> pos = str.<span style="color: #703daa" class="">startIndex</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""> <span style="color: #ba2da2" class="">let</span> r = str.range(of: <span style="color: #d12f1b" class="">"f"</span>, range: pos...)</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0); background-color: rgb(255, 255, 255);" class=""><span style="color: #000000" class=""> </span>// error: cannot convert value of type 'PartialRangeFrom<String.Index>'</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0); background-color: rgb(255, 255, 255);" class=""><span style="color: #000000" class=""> </span>// to expected argument type 'Range<String.Index>?'</div></div><div class=""><br class=""></div><div class="">Is that because it is an NSString method imported to Swift? Would it make sense to file an enhancement request?</div><div class=""><br class=""></div><div class="">Regards, Martin</div><div class=""><br class=""></div></body></html>