From 3c8d65772f6433a07e53f9223464117ac9ba5365 Mon Sep 17 00:00:00 2001 From: Saksham Shrey Date: Mon, 26 Feb 2024 12:29:19 +0530 Subject: [PATCH 1/2] Added Range Operators in Swift --- source/_posts/swift.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source/_posts/swift.md b/source/_posts/swift.md index b1f0963..c7abc3c 100644 --- a/source/_posts/swift.md +++ b/source/_posts/swift.md @@ -436,6 +436,19 @@ if weather == "sunny" { +### Range Operators + +```swift +a...b // numbers between a and b (including both a and b) +a.. Date: Mon, 26 Feb 2024 12:39:35 +0530 Subject: [PATCH 2/2] Added Range Operators in Swift --- source/_posts/swift.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/source/_posts/swift.md b/source/_posts/swift.md index c7abc3c..b97ada7 100644 --- a/source/_posts/swift.md +++ b/source/_posts/swift.md @@ -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
+-`>` greater than
+-`<=` less than or equal to
+-`>=` greater than or equal to
+-`==` is equal to
+-`!=` is not equal to @@ -444,9 +444,9 @@ a.. +-`a.. +-`...b` One-Sided Range ### Ternary conditional operator