operator
!= {
associativity
precedence
}
Declarations
Returns false
iff t0
is identical to t1
; i.e. if they are both
nil
or they both represent the same type.
Declaration
func
!=(
t0
:
Any
.
Type
?,
t1
:
Any
.
Type
?) -
>
Bool
Returns a Boolean value indicating whether any corresponding components of the two tuples are not equal.
For two tuples to compare as equal, each corresponding pair of components must be equal. The following example compares tuples made up of 6 components:
let
a
= (
"a"
,
1
,
2
,
3
,
4
,
5
)
let
b
= (
"a"
,
1
,
2
,
3
,
4
,
5
)
(
a
!=
b
)
// Prints "false"
let
c
= (
"a"
,
1
,
2
,
3
,
4
,
6
)
(
a
!=
c
)
// Prints "true"
Parameters:
lhs: A tuple of Equatable
elements.
rhs: Another tuple of elements of the same type as lhs
.
Declaration
Returns a Boolean value indicating whether any corresponding components of the two tuples are not equal.
For two tuples to compare as equal, each corresponding pair of components must be equal. The following example compares tuples made up of 5 components:
let
a
= (
"a"
,
1
,
2
,
3
,
4
)
let
b
= (
"a"
,
1
,
2
,
3
,
4
)
(
a
!=
b
)
// Prints "false"
let
c
= (
"a"
,
1
,
2
,
3
,
5
)
(
a
!=
c
)
// Prints "true"
Parameters:
lhs: A tuple of Equatable
elements.
rhs: Another tuple of elements of the same type as lhs
.
Declaration
Returns a Boolean value indicating whether any corresponding components of the two tuples are not equal.
For two tuples to compare as equal, each corresponding pair of components must be equal. The following example compares tuples made up of 4 components:
let
a
= (
"a"
,
1
,
2
,
3
)
let
b
= (
"a"
,
1
,
2
,
3
)
(
a
!=
b
)
// Prints "false"
let
c
= (
"a"
,
1
,
2
,
4
)
(
a
!=
c
)
// Prints "true"
Parameters:
lhs: A tuple of Equatable
elements.
rhs: Another tuple of elements of the same type as lhs
.
Declaration
Returns a Boolean value indicating whether any corresponding components of the two tuples are not equal.
For two tuples to compare as equal, each corresponding pair of components must be equal. The following example compares tuples made up of 3 components:
let
a
= (
"a"
,
1
,
2
)
let
b
= (
"a"
,
1
,
2
)
(
a
!=
b
)
// Prints "false"
let
c
= (
"a"
,
1
,
3
)
(
a
!=
c
)
// Prints "true"
Parameters:
lhs: A tuple of Equatable
elements.
rhs: Another tuple of elements of the same type as lhs
.
Declaration
Returns a Boolean value indicating whether any corresponding components of the two tuples are not equal.
For two tuples to compare as equal, each corresponding pair of components must be equal. The following example compares tuples made up of 2 components:
let
a
= (
"a"
,
1
)
let
b
= (
"a"
,
1
)
(
a
!=
b
)
// Prints "false"
let
c
= (
"a"
,
2
)
(
a
!=
c
)
// Prints "true"
Parameters:
lhs: A tuple of Equatable
elements.
rhs: Another tuple of elements of the same type as lhs
.
Declaration
Returns true
if the arrays do not contain the same elements.
Declaration
func
!=
<
Element
:
Equatable
>
(
lhs
:
ArraySlice
<
Element
>
,
rhs
:
ArraySlice
<
Element
>
) -
>
Bool
Returns true
if the arrays do not contain the same elements.
Declaration
func
!=
<
Element
:
Equatable
>
(
lhs
:
ContiguousArray
<
Element
>
,
rhs
:
ContiguousArray
<
Element
>
) -
>
Bool
Returns a Boolean value indicating whether the two arguments are not equal.
Parameters: lhs: A raw-representable instance. rhs: A second raw-representable instance.
Declaration
func
!=
<
T
:
Equatable
where
T
:
RawRepresentable
,
T
.
RawValue
:
Equatable
>
(
lhs
:
T
,
rhs
:
T
) -
>
Bool
Returns a Boolean value indicating whether two values are not equal.
Inequality is the inverse of equality. For any values a
and b
, a != b
implies that a == b
is false
.
This is the default implementation of the not-equal-to operator (!=
)
for any type that conforms to Equatable
.
Parameters: lhs: A value to compare. rhs: Another value to compare.
Declaration
Returns a Boolean value indicating whether the two arguments are not equal.
Parameters: lhs: A raw-representable instance. rhs: A second raw-representable instance.
Declaration
func
!=
<
T
:
RawRepresentable
where
T
.
RawValue
:
Equatable
>
(
lhs
:
T
,
rhs
:
T
) -
>
Bool
Declaration
func
!=
<
T
>
(
lhs
:
_OptionalNilComparisonType
,
rhs
:
T
?) -
>
Bool
Declaration
func
!=
<
T
>
(
lhs
:
T
?,
rhs
:
_OptionalNilComparisonType
) -
>
Bool
Returns a Boolean value that indicates whether the two arguments have unequal values.
See Also:
Equatable
,Comparable
Declaration
func
!=(
lhs
:
Int
,
rhs
:
Int
) -
>
Bool