mirror of
https://github.com/Fechin/reference.git
synced 2026-11-20 21:23:11 +03:00
Added Range Operators in Swift
This commit is contained in:
1 parent
3c8d65772f
commit
6ef8b02645
1 file changed
+9
-9
@@ -427,12 +427,12 @@ if weather == "sunny" {
|
||||
"B" != "b" // true
|
||||
```
|
||||
|
||||
-`<` less than
|
||||
-`>` greater than
|
||||
-`<=` less than or equal to
|
||||
-`>=` greater than or equal to
|
||||
-`==` is equal to
|
||||
-`!=` is not equal to {.style-round cols-2}
|
||||
-`<` less than <br>
|
||||
-`>` greater than <br>
|
||||
-`<=` less than or equal to <br>
|
||||
-`>=` greater than or equal to <br>
|
||||
-`==` is equal to <br>
|
||||
-`!=` is not equal to
|
||||
|
||||
|
||||
|
||||
@@ -444,9 +444,9 @@ a..<b // numbers between a and b (including a but excluding b)
|
||||
...b // numbers till b (including b)
|
||||
```
|
||||
|
||||
-`a...b` Closed Range
|
||||
-`a..<b` Half-Open Range
|
||||
-`...b` One-Sided Range {.style-round cols-2}
|
||||
-`a...b` Closed Range <br>
|
||||
-`a..<b` Half-Open Range <br>
|
||||
-`...b` One-Sided Range
|
||||
|
||||
|
||||
### Ternary conditional operator
|
||||
|
||||
Reference in new issue
Block a user