Skip to content

Commit baac4fc

Browse files
committed
Merge branch 'main' into deploy-gh-pages
2 parents db88f05 + 8ffb7de commit baac4fc

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

content/en/posts/post-13/index.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,12 @@ First, let's get a working example of our `NSDataDetector` to detect phone numbe
6464

6565
```swift
6666
import Foundation
67-
import RegexBuilder
6867

6968
let types: NSTextCheckingResult.CheckingType = [.phoneNumber]
7069
let detector = try NSDataDetector(types: types.rawValue)
71-
let input = "(808) 232-4825"
70+
let input = "(789) 555-1234"
7271
let swiftRange = input.startIndex..<input.endIndex
73-
let nsRange = NSRange(swiftRange, in: input) // Fatal error: String index is out of bounds
72+
let nsRange = NSRange(swiftRange, in: input)
7473
var result: String?
7574
detector.enumerateMatches(
7675
in: input,

content/en/posts/post-13/usage.png

757 KB
Loading

0 commit comments

Comments
 (0)