SwiftExtension // Add bool operators.
This commit is contained in:
parent
6e46ba8fee
commit
a83c91c738
|
@ -8,6 +8,20 @@
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
// MARK: - Bool Operators
|
||||||
|
|
||||||
|
public func |= (lhs: inout Bool, rhs: Bool) {
|
||||||
|
lhs = lhs || rhs
|
||||||
|
}
|
||||||
|
|
||||||
|
public func &= (lhs: inout Bool, rhs: Bool) {
|
||||||
|
lhs = lhs && rhs
|
||||||
|
}
|
||||||
|
|
||||||
|
public func ^= (lhs: inout Bool, rhs: Bool) {
|
||||||
|
lhs = lhs != rhs
|
||||||
|
}
|
||||||
|
|
||||||
// MARK: - String.localized extension
|
// MARK: - String.localized extension
|
||||||
|
|
||||||
public extension StringLiteralType {
|
public extension StringLiteralType {
|
||||||
|
|
Loading…
Reference in New Issue