Skip to content

Commit 7426acd

Browse files
ikesyoNachoSoto
authored andcommitted
[gardening] Use NSRange.init(_:in:)
1 parent f3cd5da commit 7426acd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Task.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ extension String {
5252
var escapingWhitespaces: String {
5353
return String.whitespaceRegularExpression.stringByReplacingMatches(
5454
in: self,
55-
range: NSRange(location: 0, length: self.utf16.count),
55+
range: NSRange(startIndex..., in: self),
5656
withTemplate: "\\\\$0"
5757
).replacingOccurrences(of: "\0", with: "")
5858
}

0 commit comments

Comments
 (0)