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

# Comparable Implementations

## Topics

### Operators

[`static func ... (Self) -> PartialRangeThrough<Self>`](/documentation/Swift/String/...(_:)-4mm4o)

Returns a partial range up to, and including, its upper bound.

[`static func ... (Self) -> PartialRangeFrom<Self>`](/documentation/Swift/String/...(_:)-6ct5g)

Returns a partial range extending upward from a lower bound.

[`static func ... (Self, Self) -> ClosedRange<Self>`](/documentation/Swift/String/...(_:_:))

Returns a closed range that contains both of its bounds.

[`static func ..< (Self) -> PartialRangeUpTo<Self>`](/documentation/Swift/String/.._(_:))

Returns a partial range up to, but not including, its upper bound.

[`static func ..< (Self, Self) -> Range<Self>`](/documentation/Swift/String/.._(_:_:))

Returns a half-open range that contains its lower bound but not its upper
bound.

[`static func < (String, String) -> Bool`](/documentation/Swift/String/_(_:_:))

Returns a Boolean value indicating whether the value of the first
argument is less than that of the second argument.

[`static func > (borrowing Self, borrowing Self) -> Bool`](/documentation/Swift/String/_(_:_:)-3izr3)

Returns a Boolean value indicating whether the value of the first argument
is greater than that of the second argument.

[`static func <= (borrowing Self, borrowing Self) -> Bool`](/documentation/Swift/String/_=(_:_:)-5i1qy)

Returns a Boolean value indicating whether the value of the first argument
is less than or equal to that of the second argument.

[`static func >= (borrowing Self, borrowing Self) -> Bool`](/documentation/Swift/String/_=(_:_:)-5nvya)

Returns a Boolean value indicating whether the value of the first argument
is greater than or equal to that of the second argument.

---

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)