<div dir="ltr">TextCheckingResult i<div class="gmail_default" style="font-family:georgia,serif;display:inline">​s​</div><div class="gmail_default" style="font-family:georgia,serif;display:inline"> <a href="https://developer.apple.com/reference/foundation/nstextcheckingresult#">NSTextCheckingResult</a>。</div><div><br></div><div><div class="gmail_default" style="font-family:georgia,serif">​Zhaoxin​</div><br><div class="gmail_default" style="font-family:georgia,serif"><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Aug 6, 2016 at 8:25 PM, 晓敏 褚 <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">I’m writing a program with regular expressions, and I’m finding it extremely hard to code with these in swift. I got a [TextCheckingResult] from the matching function, and there is no document on what TextCheckingResult is and how could I work with it. And when I try to use range to get a substring, I got a Range&lt;Int&gt;, but the substring:with: method requies a Range&lt;Index&gt;. But there is no way I could find any information about the type(or protocol?) Index, and passing a Int fails.<br>
What are they, and how can I work with them?<br>
______________________________<wbr>_________________<br>
swift-users mailing list<br>
<a href="mailto:swift-users@swift.org">swift-users@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-users</a><br>
</blockquote></div><br></div>