A range to compare. 比較する範囲。
Operator
演算子
==(_:
==(_:_:)
Returns a Boolean value indicating whether two ranges are equal.
2つの範囲が等しいかどうかを指し示すブール値を返します。
Availability
- iOS 8.0+
- iPadOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Xcode 8.0+
Technology
- Swift Standard Library Swift標準ライブラリ
Declaration 宣言
static func == (lhs: ClosedRange
<Bound>, rhs: ClosedRange
<Bound>) -> Bool
Parameters パラメータ
lhs
rhs
Another range to compare. もう一方の比較する範囲。
Discussion 解説
Two ranges are equal when they have the same lower and upper bounds. 2つの範囲は、それらが同じ下方および上方境界を持つとき等しいです。
let x = 5...15
print(x == 5...15)
// Prints "true"
print(x == 10...20)
// Prints "false"
Relationships 関係
From Protocol 由来プロトコル
See Also 参照
Comparing Ranges 範囲の比較
static func != (ClosedRange<Bound>, ClosedRange<Bound>) -> Bool
Returns a Boolean value indicating whether two values are not equal.
2つの値が等しくないかどうかを指し示すブール値を返します。
func overlaps(Range<Bound>) -> Bool
Returns a Boolean value indicating whether this range and the given range contain an element in common.
この範囲と与えられた範囲がある要素を共通に含むかどうかを指し示すブール値を返します。
func overlaps(ClosedRange<Bound>) -> Bool
Returns a Boolean value indicating whether this range and the given range contain an element in common.
この範囲と与えられた範囲がある要素を共通に含むかどうかを指し示すブール値を返します。