<!--
{
  "documentType" : "article",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/PartialRangeUpTo/RangeExpression-Implementations",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "RangeExpression Implementations"
}
-->

# RangeExpression Implementations

## Topics

### Operators

[`static func ~= (Self, Self.Bound) -> Bool`](/documentation/Swift/PartialRangeUpTo/~=(_:_:))

Returns a Boolean value indicating whether a value is included in a
range.

### Instance Methods

[`func contains(Bound) -> Bool`](/documentation/Swift/PartialRangeUpTo/contains(_:))

Returns a Boolean value indicating whether the given element is contained
within the range expression.

[`func relative<C>(to: C) -> Range<Bound>`](/documentation/Swift/PartialRangeUpTo/relative(to:))

Returns the range of indices described by this range expression within
the given collection.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)