   /// enumerating the specific range of the string, providing the
   /// Block with the located tags.
   public func enumerateLinguisticTags<
-    T : StringProtocol
+    T : StringProtocol, R : RangeExpression
   >(
-    in range: Range<Index>,
+    in range: R,
     scheme tagScheme: T,
     options opts: NSLinguisticTagger.Options = [],
     orthography: NSOrthography? = nil,
     invoking body:
       (String, Range<Index>, Range<Index>, inout Bool) -> Void
-  ) {
+  ) where R.Bound == Index {
+    let range = range.relative(to: self)
     _ns.enumerateLinguisticTags(
       in: _toNSRange(range),
       scheme: tagScheme._ephemeralString,

  public func localizedCaseInsensitiveContains<
    T : StringProtocol
  >(_ other: T) -> Bool {
    let other = other._ephemeralString
    let r = self.range(
      of: other, options: .caseInsensitive, locale: Locale.current
    ) != nil
    if #available(OSX 10.10, iOS 8.0, *) {
      _sanityCheck(r == _ns.localizedCaseInsensitiveContains(other))
    }
    return r
  }

  /// Returns a new string made by replacing in the `String`
  /// all percent escapes with the matching characters as determined
  /// by a given encoding.
  @available(swift, deprecated: 3.0, obsoleted: 4.0,
    message: "Use removingPercentEncoding instead, which always uses the recommended UTF-8 encoding.")
  public func replacingPercentEscapes(
    using encoding: String.Encoding
